OSDN Git Service

Fix crash creating notification lockscreen setting.
authorJulia Reynolds <juliacr@google.com>
Fri, 14 Aug 2015 16:59:52 +0000 (12:59 -0400)
committerJulia Reynolds <juliacr@google.com>
Fri, 14 Aug 2015 19:55:08 +0000 (15:55 -0400)
Bug: 23210434
Change-Id: Ic214b34cb540e226c9e871fcda8432460cf3a46f

src/com/android/settings/notification/NotificationSettings.java

index d160e35..37ed34c 100644 (file)
@@ -463,6 +463,9 @@ public class NotificationSettings extends SettingsPreferenceFragment implements
         }
         entries.add(getString(R.string.lock_screen_notifications_summary_disable));
         values.add(Integer.toString(R.string.lock_screen_notifications_summary_disable));
+
+        mLockscreen.setEntries(entries.toArray(new CharSequence[entries.size()]));
+        mLockscreen.setEntryValues(values.toArray(new CharSequence[values.size()]));
         updateLockscreenNotifications();
         if (mLockscreen.getEntries().length > 1) {
             mLockscreen.setOnPreferenceChangeListener(new OnPreferenceChangeListener() {