Loading core/java/android/app/Notification.java +12 −2 Original line number Diff line number Diff line Loading @@ -5606,14 +5606,24 @@ public class Notification implements Parcelable final boolean snoozeEnabled = !hideSnoozeButton && mContext.getContentResolver() != null && (Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.SHOW_NOTIFICATION_SNOOZE, 0) == 1); && isSnoozeSettingEnabled(); if (snoozeEnabled) { big.setViewLayoutMarginDimen(R.id.notification_action_list_margin_target, RemoteViews.MARGIN_BOTTOM, 0); } } private boolean isSnoozeSettingEnabled() { try { return Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.SHOW_NOTIFICATION_SNOOZE, 0) == 1; } catch (SecurityException ex) { // Most 3p apps can't access this snooze setting, so their NotificationListeners // would be unable to create notification views if we propagated this exception. return false; } } /** * Returns the actions that are not contextual. */ Loading Loading
core/java/android/app/Notification.java +12 −2 Original line number Diff line number Diff line Loading @@ -5606,14 +5606,24 @@ public class Notification implements Parcelable final boolean snoozeEnabled = !hideSnoozeButton && mContext.getContentResolver() != null && (Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.SHOW_NOTIFICATION_SNOOZE, 0) == 1); && isSnoozeSettingEnabled(); if (snoozeEnabled) { big.setViewLayoutMarginDimen(R.id.notification_action_list_margin_target, RemoteViews.MARGIN_BOTTOM, 0); } } private boolean isSnoozeSettingEnabled() { try { return Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.SHOW_NOTIFICATION_SNOOZE, 0) == 1; } catch (SecurityException ex) { // Most 3p apps can't access this snooze setting, so their NotificationListeners // would be unable to create notification views if we propagated this exception. return false; } } /** * Returns the actions that are not contextual. */ Loading