diff options
author | John Spurlock <jspurlock@google.com> | 2014-05-24 14:40:05 -0400 |
---|---|---|
committer | John Spurlock <jspurlock@google.com> | 2014-05-24 14:40:05 -0400 |
commit | 85ba0ee6ec978b760720f1ece3e8e64e0340d260 (patch) | |
tree | 1cfda47eba30ce82c178ce8425862d6d29b38b3f | |
parent | 7ca0cd415c4d5069e4981a6d5e41e8aa9a43f23e (diff) | |
download | packages_apps_Settings-85ba0ee6ec978b760720f1ece3e8e64e0340d260.zip packages_apps_Settings-85ba0ee6ec978b760720f1ece3e8e64e0340d260.tar.gz packages_apps_Settings-85ba0ee6ec978b760720f1ece3e8e64e0340d260.tar.bz2 |
Fix crash when launching zen mode settings.
The switch bar is only accessible in onActivityCreated. Defer
initialization until then.
Bug:15214851
Change-Id: Ie026d46250dae397ba0af02e833bb178631fe708
-rw-r--r-- | src/com/android/settings/notification/ZenModeSettings.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/settings/notification/ZenModeSettings.java b/src/com/android/settings/notification/ZenModeSettings.java index e69fe95..b5651f4 100644 --- a/src/com/android/settings/notification/ZenModeSettings.java +++ b/src/com/android/settings/notification/ZenModeSettings.java @@ -141,8 +141,8 @@ public class ZenModeSettings extends SettingsPreferenceFragment implements Index } @Override - public void onCreate(Bundle icicle) { - super.onCreate(icicle); + public void onActivityCreated(Bundle savedInstanceState) { + super.onActivityCreated(savedInstanceState); mContext = getActivity(); mPM = mContext.getPackageManager(); final Resources res = mContext.getResources(); |