Enforce Keyguard policy in Notification Settings

- Applied getKeyguardDisabledFeatures for notification settings and
    notification setup page (after settings a screenlock)
- If a notification settings is disabled, the next least secure setting
    will be chosen
- Although KEYGUARD_DISABLE_UNREDACTED_NOTIFICATIONS can be set be
    profile, it will not be reflected in both settings page. This is
    because it does not affect the owner (user 0), as mentioned in
    DevicePolicyManagerService.PROFILE_KEYGUARD_FEATURES_AFFECT_OWNER
- Skip RedactionInterstitial if there is <= 1 options for the user
- Tested with both Setup wizard and settings case, both pattern and
    password, as well as toggling the policy on and off

Bug: 19307118
Bug: 17099898

Change-Id: If640d5576caa0163e9942569f7b4643a30bbfe0a
diff --git a/src/com/android/settings/SetupRedactionInterstitial.java b/src/com/android/settings/SetupRedactionInterstitial.java
index 590788b..4939aea 100644
--- a/src/com/android/settings/SetupRedactionInterstitial.java
+++ b/src/com/android/settings/SetupRedactionInterstitial.java
@@ -40,9 +40,11 @@
 
     public static Intent createStartIntent(Context ctx) {
         Intent startIntent = RedactionInterstitial.createStartIntent(ctx);
-        startIntent.setClass(ctx, SetupRedactionInterstitial.class);
-        startIntent.putExtra(EXTRA_PREFS_SHOW_BUTTON_BAR, false)
-                .putExtra(EXTRA_SHOW_FRAGMENT_TITLE_RESID, -1);
+        if (startIntent != null) {
+            startIntent.setClass(ctx, SetupRedactionInterstitial.class);
+            startIntent.putExtra(EXTRA_PREFS_SHOW_BUTTON_BAR, false)
+                    .putExtra(EXTRA_SHOW_FRAGMENT_TITLE_RESID, -1);
+        }
         return startIntent;
     }