Merge "onResume -> onStart, onPause -> onStop" into nyc-dev
diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index 9c8d410..d989535 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -428,15 +428,6 @@
}
@Override
- protected void onStart() {
- super.onStart();
-
- if (mNeedToRevertToInitialFragment) {
- revertToInitialFragment();
- }
- }
-
- @Override
public boolean onCreateOptionsMenu(Menu menu) {
if (!mDisplaySearch) {
return false;
@@ -788,8 +779,12 @@
}
@Override
- protected void onResume() {
- super.onResume();
+ protected void onStart() {
+ super.onStart();
+
+ if (mNeedToRevertToInitialFragment) {
+ revertToInitialFragment();
+ }
mDevelopmentPreferencesListener = new SharedPreferences.OnSharedPreferenceChangeListener() {
@Override
@@ -813,8 +808,8 @@
}
@Override
- protected void onPause() {
- super.onPause();
+ protected void onStop() {
+ super.onStop();
unregisterReceiver(mBatteryInfoReceiver);
unregisterReceiver(mUserAddRemoveReceiver);
mDynamicIndexableContentMonitor.unregister();
diff --git a/src/com/android/settings/dashboard/DashboardSummary.java b/src/com/android/settings/dashboard/DashboardSummary.java
index e08173f..a53f41b 100644
--- a/src/com/android/settings/dashboard/DashboardSummary.java
+++ b/src/com/android/settings/dashboard/DashboardSummary.java
@@ -110,9 +110,9 @@
}
@Override
- public void onResume() {
+ public void onStart() {
long startTime = System.currentTimeMillis();
- super.onResume();
+ super.onStart();
((SettingsDrawerActivity) getActivity()).addCategoryListener(this);
mSummaryLoader.setListening(true);
@@ -127,13 +127,13 @@
DashboardAdapter.getSuggestionIdentifier(getContext(), suggestion));
}
}
- if (DEBUG_TIMING) Log.d(TAG, "onResume took " + (System.currentTimeMillis() - startTime)
+ if (DEBUG_TIMING) Log.d(TAG, "onStart took " + (System.currentTimeMillis() - startTime)
+ " ms");
}
@Override
- public void onPause() {
- super.onPause();
+ public void onStop() {
+ super.onStop();
((SettingsDrawerActivity) getActivity()).remCategoryListener(this);
mSummaryLoader.setListening(false);