[Galaxy Note 4 Android Development (Snapdragon)] jonman364:
Not sure what I am missing. I get a FC on the Notification screen.

Exception thrown:

07-28 11:46:08.120 14477-14477/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.android.settings, PID: 14477
java.lang.RuntimeException: Unable to resume activity {com.android.settings/com.android.settings.NotificationPanelSettings}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.preference.CheckBoxPreference.setChecked(boolean)' on a null object reference
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3424)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3455)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2782)
at android.app.ActivityThread.access$900(ActivityThread.java:179)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1462)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5972)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.preference.CheckBoxPreference.setChecked(boolean)' on a null object reference
at com.android.settings.NotificationPanelMenu.onResume(NotificationPanelMenu.java:572)
at android.app.Fragment.performResume(Fragment.java:2162)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:943)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1082)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1064)
at android.app.FragmentManagerImpl.dispatchResume(FragmentManager.java:1894)
at android.app.Activity.performResume(Activity.java:6433)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3413)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3455)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2782)
at android.app.ActivityThread.access$900(ActivityThread.java:179)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1462)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5972)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)

Diff:

diff -Nrup SecSettings/res/xml/notification_panel_menu.xml SecSettings-new/res/xml/notification_panel_menu.xml
--- SecSettings/res/xml/notification_panel_menu.xml 2015-07-28 12:18:33.000000000 -0400
+++ SecSettings-new/res/xml/notification_panel_menu.xml 2015-07-28 11:14:36.000000000 -0400
@@ -3,8 +3,8 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:touchwiz="http://schemas.android.com/apk/res/touchwiz">
<PreferenceScreen android:title="@string/notification_manager_panel_title" android:key="notification_manager" android:summary="@string/notification_manager_panel_summary" android:fragment="com.android.settings.applications.ManageNotification" />
- <CheckBoxPreference android:title="@string/bright_adjustment_panel_title" android:key="brightness_adjustment" />
+ <CheckBoxPreference android:title="@string/bright_adjustment_panel_title" android:key="notification_panel_brightness_adjustment" />
<SwitchPreferenceScreen android:title="@string/recommended_apps" android:key="recommended_apps" android:summary="@string/recommended_apps_summary" android:fragment="com.android.settings.RecommendedAppsMenu" />
<com.android.settings.SwitchPreferenceScreen android:title="@string/recommended_apps" android:key="recommended_apps_phone" android:fragment="com.android.settings.RecommendedAppsMenu" />
<com.android.settings.SwitchPreferenceScreen android:title="@string/toolbox" android:key="toolbox" android:summary="@string/toolbox_summary" android:fragment="com.android.settings.toolbox.ToolboxMenu" />
-</PreferenceScreen>
\ No newline at end of file
+</PreferenceScreen>
diff -Nrup SecSettings/smali/com/android/settings/NotificationPanelMenu.smali SecSettings-new/smali/com/android/settings/NotificationPanelMenu.smali
--- SecSettings/smali/com/android/settings/NotificationPanelMenu.smali 2015-07-28 12:18:40.000000000 -0400
+++ SecSettings-new/smali/com/android/settings/NotificationPanelMenu.smali 2015-07-28 11:20:41.000000000 -0400
@@ -5321,7 +5321,7 @@
iput-object v4, p0, Lcom/android/settings/NotificationPanelMenu;->mNotificationmanager:Landroid/preference/PreferenceScreen;

.line 357
- const-string v4, "brightness_adjustment"
+ const-string v4, "notification_panel_brightness_adjustment"

invoke-virtual {p0, v4}, Lcom/android/settings/NotificationPanelMenu;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

@@ -5612,8 +5612,6 @@

iget-object v5, p0, Lcom/android/settings/NotificationPanelMenu;->mBrightness:Landroid/preference/CheckBoxPreference;

- invoke-virtual {v4, v5}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z
-
.line 430
:cond_7
iget-object v4, p0, Lcom/android/settings/NotificationPanelMenu;->mRecommendedApps:Landroid/preference/SwitchPreferenceScreen;