Loading core/java/android/provider/Settings.java +10 −0 Original line number Diff line number Diff line Loading @@ -8695,6 +8695,16 @@ public final class Settings { public static final String BUBBLE_IMPORTANT_CONVERSATIONS = "bubble_important_conversations"; /** * When enabled, notifications the notification assistant service has modified will show an * indicator. When tapped, this indicator will describe the adjustment made and solicit * feedback. This flag will also add a "automatic" option to the long press menu. * * The value 1 - enable, 0 - disable * @hide */ public static final String NOTIFICATION_FEEDBACK_ENABLED = "notification_feedback_enabled"; /** * Whether notifications are dismissed by a right-to-left swipe (instead of a left-to-right * swipe). Loading packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java +1 −0 Original line number Diff line number Diff line Loading @@ -112,6 +112,7 @@ public class SecureSettings { Settings.Secure.FACE_UNLOCK_ALWAYS_REQUIRE_CONFIRMATION, Settings.Secure.VR_DISPLAY_MODE, Settings.Secure.NOTIFICATION_BADGING, Settings.Secure.NOTIFICATION_FEEDBACK_ENABLED, Settings.Secure.NOTIFICATION_DISMISS_RTL, Settings.Secure.QS_AUTO_ADDED_TILES, Settings.Secure.SCREENSAVER_ENABLED, Loading packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java +1 −0 Original line number Diff line number Diff line Loading @@ -189,6 +189,7 @@ public class SecureSettingsValidators { VALIDATORS.put(Secure.LOCK_SCREEN_SHOW_SILENT_NOTIFICATIONS, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.SHOW_NOTIFICATION_SNOOZE, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.NOTIFICATION_HISTORY_ENABLED, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.NOTIFICATION_FEEDBACK_ENABLED, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.ZEN_DURATION, ANY_INTEGER_VALIDATOR); VALIDATORS.put(Secure.SHOW_ZEN_UPGRADE_NOTIFICATION, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.SHOW_ZEN_SETTINGS_SUGGESTION, BOOLEAN_VALIDATOR); Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationViewHierarchyManager.java +6 −8 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import com.android.systemui.bubbles.BubbleController; import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.statusbar.dagger.StatusBarModule; import com.android.systemui.statusbar.notification.AssistantFeedbackController; import com.android.systemui.statusbar.notification.DynamicChildBindController; import com.android.systemui.statusbar.notification.DynamicPrivacyController; import com.android.systemui.statusbar.notification.NotificationEntryManager; Loading Loading @@ -88,6 +89,7 @@ public class NotificationViewHierarchyManager implements DynamicPrivacyControlle private final DynamicPrivacyController mDynamicPrivacyController; private final KeyguardBypassController mBypassController; private final ForegroundServiceSectionController mFgsSectionController; private AssistantFeedbackController mAssistantFeedbackController; private final Context mContext; private NotificationPresenter mPresenter; Loading Loading @@ -115,7 +117,8 @@ public class NotificationViewHierarchyManager implements DynamicPrivacyControlle DynamicPrivacyController privacyController, ForegroundServiceSectionController fgsSectionController, DynamicChildBindController dynamicChildBindController, LowPriorityInflationHelper lowPriorityInflationHelper) { LowPriorityInflationHelper lowPriorityInflationHelper, AssistantFeedbackController assistantFeedbackController) { mContext = context; mHandler = mainHandler; mLockscreenUserManager = notificationLockscreenUserManager; Loading @@ -132,6 +135,7 @@ public class NotificationViewHierarchyManager implements DynamicPrivacyControlle mDynamicPrivacyController = privacyController; mDynamicChildBindController = dynamicChildBindController; mLowPriorityInflationHelper = lowPriorityInflationHelper; mAssistantFeedbackController = assistantFeedbackController; } public void setUpWithPresenter(NotificationPresenter presenter, Loading Loading @@ -488,7 +492,7 @@ public class NotificationViewHierarchyManager implements DynamicPrivacyControlle } row.showAppOpsIcons(entry.mActiveAppOps); row.showFeedbackIcon(showFeedback(entry)); row.showFeedbackIcon(mAssistantFeedbackController.showFeedbackIndicator(entry)); row.setLastAudiblyAlertedMs(entry.getLastAudiblyAlertedMs()); } Loading Loading @@ -530,10 +534,4 @@ public class NotificationViewHierarchyManager implements DynamicPrivacyControlle } mPerformingUpdate = false; } public static boolean showFeedback(NotificationEntry entry) { Ranking ranking = entry.getRanking(); return ranking.getImportance() != ranking.getChannel().getImportance() || ranking.getRankingAdjustment() != Ranking.RANKING_UNCHANGED; } } packages/SystemUI/src/com/android/systemui/statusbar/dagger/StatusBarDependenciesModule.java +5 −2 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ import com.android.systemui.statusbar.NotificationMediaManager; import com.android.systemui.statusbar.NotificationRemoteInputManager; import com.android.systemui.statusbar.NotificationViewHierarchyManager; import com.android.systemui.statusbar.SmartReplyController; import com.android.systemui.statusbar.notification.AssistantFeedbackController; import com.android.systemui.statusbar.notification.DynamicChildBindController; import com.android.systemui.statusbar.notification.DynamicPrivacyController; import com.android.systemui.statusbar.notification.NotificationEntryManager; Loading Loading @@ -152,7 +153,8 @@ public interface StatusBarDependenciesModule { DynamicPrivacyController privacyController, ForegroundServiceSectionController fgsSectionController, DynamicChildBindController dynamicChildBindController, LowPriorityInflationHelper lowPriorityInflationHelper) { LowPriorityInflationHelper lowPriorityInflationHelper, AssistantFeedbackController assistantFeedbackController) { return new NotificationViewHierarchyManager( context, mainHandler, Loading @@ -166,7 +168,8 @@ public interface StatusBarDependenciesModule { privacyController, fgsSectionController, dynamicChildBindController, lowPriorityInflationHelper); lowPriorityInflationHelper, assistantFeedbackController); } /** Loading Loading
core/java/android/provider/Settings.java +10 −0 Original line number Diff line number Diff line Loading @@ -8695,6 +8695,16 @@ public final class Settings { public static final String BUBBLE_IMPORTANT_CONVERSATIONS = "bubble_important_conversations"; /** * When enabled, notifications the notification assistant service has modified will show an * indicator. When tapped, this indicator will describe the adjustment made and solicit * feedback. This flag will also add a "automatic" option to the long press menu. * * The value 1 - enable, 0 - disable * @hide */ public static final String NOTIFICATION_FEEDBACK_ENABLED = "notification_feedback_enabled"; /** * Whether notifications are dismissed by a right-to-left swipe (instead of a left-to-right * swipe). Loading
packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java +1 −0 Original line number Diff line number Diff line Loading @@ -112,6 +112,7 @@ public class SecureSettings { Settings.Secure.FACE_UNLOCK_ALWAYS_REQUIRE_CONFIRMATION, Settings.Secure.VR_DISPLAY_MODE, Settings.Secure.NOTIFICATION_BADGING, Settings.Secure.NOTIFICATION_FEEDBACK_ENABLED, Settings.Secure.NOTIFICATION_DISMISS_RTL, Settings.Secure.QS_AUTO_ADDED_TILES, Settings.Secure.SCREENSAVER_ENABLED, Loading
packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java +1 −0 Original line number Diff line number Diff line Loading @@ -189,6 +189,7 @@ public class SecureSettingsValidators { VALIDATORS.put(Secure.LOCK_SCREEN_SHOW_SILENT_NOTIFICATIONS, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.SHOW_NOTIFICATION_SNOOZE, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.NOTIFICATION_HISTORY_ENABLED, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.NOTIFICATION_FEEDBACK_ENABLED, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.ZEN_DURATION, ANY_INTEGER_VALIDATOR); VALIDATORS.put(Secure.SHOW_ZEN_UPGRADE_NOTIFICATION, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.SHOW_ZEN_SETTINGS_SUGGESTION, BOOLEAN_VALIDATOR); Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationViewHierarchyManager.java +6 −8 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import com.android.systemui.bubbles.BubbleController; import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.statusbar.dagger.StatusBarModule; import com.android.systemui.statusbar.notification.AssistantFeedbackController; import com.android.systemui.statusbar.notification.DynamicChildBindController; import com.android.systemui.statusbar.notification.DynamicPrivacyController; import com.android.systemui.statusbar.notification.NotificationEntryManager; Loading Loading @@ -88,6 +89,7 @@ public class NotificationViewHierarchyManager implements DynamicPrivacyControlle private final DynamicPrivacyController mDynamicPrivacyController; private final KeyguardBypassController mBypassController; private final ForegroundServiceSectionController mFgsSectionController; private AssistantFeedbackController mAssistantFeedbackController; private final Context mContext; private NotificationPresenter mPresenter; Loading Loading @@ -115,7 +117,8 @@ public class NotificationViewHierarchyManager implements DynamicPrivacyControlle DynamicPrivacyController privacyController, ForegroundServiceSectionController fgsSectionController, DynamicChildBindController dynamicChildBindController, LowPriorityInflationHelper lowPriorityInflationHelper) { LowPriorityInflationHelper lowPriorityInflationHelper, AssistantFeedbackController assistantFeedbackController) { mContext = context; mHandler = mainHandler; mLockscreenUserManager = notificationLockscreenUserManager; Loading @@ -132,6 +135,7 @@ public class NotificationViewHierarchyManager implements DynamicPrivacyControlle mDynamicPrivacyController = privacyController; mDynamicChildBindController = dynamicChildBindController; mLowPriorityInflationHelper = lowPriorityInflationHelper; mAssistantFeedbackController = assistantFeedbackController; } public void setUpWithPresenter(NotificationPresenter presenter, Loading Loading @@ -488,7 +492,7 @@ public class NotificationViewHierarchyManager implements DynamicPrivacyControlle } row.showAppOpsIcons(entry.mActiveAppOps); row.showFeedbackIcon(showFeedback(entry)); row.showFeedbackIcon(mAssistantFeedbackController.showFeedbackIndicator(entry)); row.setLastAudiblyAlertedMs(entry.getLastAudiblyAlertedMs()); } Loading Loading @@ -530,10 +534,4 @@ public class NotificationViewHierarchyManager implements DynamicPrivacyControlle } mPerformingUpdate = false; } public static boolean showFeedback(NotificationEntry entry) { Ranking ranking = entry.getRanking(); return ranking.getImportance() != ranking.getChannel().getImportance() || ranking.getRankingAdjustment() != Ranking.RANKING_UNCHANGED; } }
packages/SystemUI/src/com/android/systemui/statusbar/dagger/StatusBarDependenciesModule.java +5 −2 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ import com.android.systemui.statusbar.NotificationMediaManager; import com.android.systemui.statusbar.NotificationRemoteInputManager; import com.android.systemui.statusbar.NotificationViewHierarchyManager; import com.android.systemui.statusbar.SmartReplyController; import com.android.systemui.statusbar.notification.AssistantFeedbackController; import com.android.systemui.statusbar.notification.DynamicChildBindController; import com.android.systemui.statusbar.notification.DynamicPrivacyController; import com.android.systemui.statusbar.notification.NotificationEntryManager; Loading Loading @@ -152,7 +153,8 @@ public interface StatusBarDependenciesModule { DynamicPrivacyController privacyController, ForegroundServiceSectionController fgsSectionController, DynamicChildBindController dynamicChildBindController, LowPriorityInflationHelper lowPriorityInflationHelper) { LowPriorityInflationHelper lowPriorityInflationHelper, AssistantFeedbackController assistantFeedbackController) { return new NotificationViewHierarchyManager( context, mainHandler, Loading @@ -166,7 +168,8 @@ public interface StatusBarDependenciesModule { privacyController, fgsSectionController, dynamicChildBindController, lowPriorityInflationHelper); lowPriorityInflationHelper, assistantFeedbackController); } /** Loading