summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaiyiz <kaiyiz@codeaurora.org>2014-04-21 18:15:33 +0800
committerAdnan <adnan@cyngn.com>2014-08-26 14:46:52 -0700
commite1f2fccfd9ff54966e0979e17bdfbf06daa273dd (patch)
treee4412769e65c1c1ea4a5b31695ae6cc9f4d4eba4
parent4c4689eff040e7233a290bd22cf73655f4a1f68b (diff)
downloadandroid_packages_apps_Calendar-e1f2fccfd9ff54966e0979e17bdfbf06daa273dd.tar.gz
android_packages_apps_Calendar-e1f2fccfd9ff54966e0979e17bdfbf06daa273dd.tar.bz2
android_packages_apps_Calendar-e1f2fccfd9ff54966e0979e17bdfbf06daa273dd.zip
Calendar: The delete events option status changed after rotate screen
Calendar through LoadManager to query the total number of events, and update the delete events option status in onLoadFinished method. But this method will be called at the first time load data or data have changed, so can't update option status when rotating screen. Calls the initLoader function in onCreate and onResume ensure that the onLoadFinished can be callback. CRs-Fixed: 650667 Change-Id: Id96f28bf648de374fb5d2cb7e0827e072f5342bd
-rw-r--r--src/com/android/calendar/AllInOneActivity.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/calendar/AllInOneActivity.java b/src/com/android/calendar/AllInOneActivity.java
index b7d76ab7..51b6342b 100644
--- a/src/com/android/calendar/AllInOneActivity.java
+++ b/src/com/android/calendar/AllInOneActivity.java
@@ -471,6 +471,9 @@ public class AllInOneActivity extends AbstractCalendarActivity implements EventH
prefs.registerOnSharedPreferenceChangeListener(this);
mContentResolver = getContentResolver();
+ if (getResources().getBoolean(R.bool.show_delete_events_menu)) {
+ getLoaderManager().initLoader(0, null, this);
+ }
}
private long parseViewAction(final Intent intent) {
@@ -595,6 +598,9 @@ public class AllInOneActivity extends AbstractCalendarActivity implements EventH
invalidateOptionsMenu();
mCalIntentReceiver = Utils.setTimeChangesReceiver(this, mTimeChangesUpdater);
+ if (getResources().getBoolean(R.bool.show_delete_events_menu)) {
+ getLoaderManager().initLoader(0, null, this);
+ }
}
@Override