Loading packages/SystemUI/src/com/android/systemui/statusbar/InterceptedNotifications.java +7 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.content.Context; import android.os.Binder; import android.os.IBinder; import android.os.Process; import android.provider.Settings; import android.service.notification.StatusBarNotification; import android.util.ArrayMap; import android.view.View; Loading Loading @@ -59,6 +60,7 @@ public class InterceptedNotifications { public boolean tryIntercept(IBinder key, StatusBarNotification notification) { if (!notification.getNotification().extras.getBoolean(EXTRA_INTERCEPT)) return false; if (shouldDisplayIntercepted()) return false; mIntercepted.put(key, notification); updateSyntheticNotification(); return true; Loading @@ -80,6 +82,11 @@ public class InterceptedNotifications { } } private boolean shouldDisplayIntercepted() { return Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.DISPLAY_INTERCEPTED_NOTIFICATIONS, 0) != 0; } private void updateSyntheticNotification() { if (mIntercepted.isEmpty()) { if (mSynKey != null) { Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/InterceptedNotifications.java +7 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.content.Context; import android.os.Binder; import android.os.IBinder; import android.os.Process; import android.provider.Settings; import android.service.notification.StatusBarNotification; import android.util.ArrayMap; import android.view.View; Loading Loading @@ -59,6 +60,7 @@ public class InterceptedNotifications { public boolean tryIntercept(IBinder key, StatusBarNotification notification) { if (!notification.getNotification().extras.getBoolean(EXTRA_INTERCEPT)) return false; if (shouldDisplayIntercepted()) return false; mIntercepted.put(key, notification); updateSyntheticNotification(); return true; Loading @@ -80,6 +82,11 @@ public class InterceptedNotifications { } } private boolean shouldDisplayIntercepted() { return Settings.Secure.getInt(mContext.getContentResolver(), Settings.Secure.DISPLAY_INTERCEPTED_NOTIFICATIONS, 0) != 0; } private void updateSyntheticNotification() { if (mIntercepted.isEmpty()) { if (mSynKey != null) { Loading