Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2126)

Side by Side Diff: base/android/java/src/org/chromium/base/ChromiumActivity.java

Issue 11419287: android: Improve ActivityStatus and add ChromiumActivity. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix "if" indentations Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.base;
6
7 import android.app.Activity;
8 import android.os.Bundle;
9
10 // All Chromium main activities should extend this class.
11 // This allows various sub-systems to properly react to activity
12 // state changes.
13 public class ChromiumActivity extends Activity {
14
15 @Override
16 protected void onCreate(Bundle savedInstance) {
17 super.onCreate(savedInstance);
18 ActivityStatus.onStateChange(this, ActivityStatus.CREATED);
19 }
20
21 @Override
22 protected void onStart() {
23 super.onStart();
24 ActivityStatus.onStateChange(this, ActivityStatus.STARTED);
25 }
26
27 @Override
28 protected void onResume() {
29 super.onResume();
30 ActivityStatus.onStateChange(this, ActivityStatus.STARTED);
31 }
32
33 @Override
34 protected void onPause() {
35 ActivityStatus.onStateChange(this, ActivityStatus.STARTED);
36 super.onPause();
37 }
38
39 @Override
40 protected void onStop() {
41 ActivityStatus.onStateChange(this, ActivityStatus.STARTED);
42 super.onStop();
43 }
44
45 @Override
46 protected void onDestroy() {
47 ActivityStatus.onStateChange(this, ActivityStatus.DESTROYED);
48 super.onDestroy();
49 }
50 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698