Loading core/java/com/android/internal/policy/GestureNavigationSettingsObserver.java +5 −2 Original line number Diff line number Diff line Loading @@ -103,8 +103,11 @@ public class GestureNavigationSettingsObserver extends ContentObserver { final DisplayMetrics dm = userRes.getDisplayMetrics(); final float defaultInset = userRes.getDimension( com.android.internal.R.dimen.config_backGestureInset) / dm.density; final float backGestureInset = DeviceConfig.getFloat(DeviceConfig.NAMESPACE_SYSTEMUI, BACK_GESTURE_EDGE_WIDTH, defaultInset); // Only apply the back gesture config if there is an existing inset final float backGestureInset = defaultInset > 0 ? DeviceConfig.getFloat(DeviceConfig.NAMESPACE_SYSTEMUI, BACK_GESTURE_EDGE_WIDTH, defaultInset) : defaultInset; final float inset = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, backGestureInset, dm); final float scale = Settings.Secure.getFloatForUser( Loading packages/SystemUI/src/com/android/systemui/media/MediaCarouselController.kt +1 −0 Original line number Diff line number Diff line Loading @@ -135,6 +135,7 @@ class MediaCarouselController @Inject constructor( } override fun onOverlayChanged() { recreatePlayers() inflateSettingsButton() } Loading packages/SystemUI/src/com/android/systemui/media/SeekBarObserver.kt +6 −6 Original line number Diff line number Diff line Loading @@ -55,16 +55,16 @@ class SeekBarObserver(private val holder: PlayerViewHolder) : Observer<SeekBarVi holder.seekBar.maxHeight = seekBarDefaultMaxHeight } data.elapsedTime?.let { holder.seekBar.setProgress(it) holder.elapsedTimeView.setText(DateUtils.formatElapsedTime( it / DateUtils.SECOND_IN_MILLIS)) } data.duration?.let { holder.seekBar.setMax(it) holder.totalTimeView.setText(DateUtils.formatElapsedTime( it / DateUtils.SECOND_IN_MILLIS)) } data.elapsedTime?.let { holder.seekBar.setProgress(it) holder.elapsedTimeView.setText(DateUtils.formatElapsedTime( it / DateUtils.SECOND_IN_MILLIS)) } } } packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java +19 −2 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import android.util.Log; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.statusbar.NotificationVisibility; import com.android.systemui.Dumpable; import com.android.systemui.bubbles.BubbleController; import com.android.systemui.statusbar.FeatureFlags; import com.android.systemui.statusbar.NotificationLifetimeExtender; import com.android.systemui.statusbar.NotificationListener; Loading Loading @@ -189,6 +190,8 @@ public class NotificationEntryManager implements } } private final Lazy<BubbleController> mBubbleControllerLazy; /** * Injected constructor. See {@link NotificationsModule}. */ Loading @@ -201,6 +204,7 @@ public class NotificationEntryManager implements Lazy<NotificationRowBinder> notificationRowBinderLazy, Lazy<NotificationRemoteInputManager> notificationRemoteInputManagerLazy, LeakDetector leakDetector, Lazy<BubbleController> bubbleController, ForegroundServiceDismissalFeatureController fgsFeatureController) { mLogger = logger; mGroupManager = groupManager; Loading @@ -211,6 +215,7 @@ public class NotificationEntryManager implements mRemoteInputManagerLazy = notificationRemoteInputManagerLazy; mLeakDetector = leakDetector; mFgsFeatureController = fgsFeatureController; mBubbleControllerLazy = bubbleController; } /** Once called, the NEM will start processing notification events from system server. */ Loading Loading @@ -920,8 +925,20 @@ public class NotificationEntryManager implements /** * @return {@code true} if there is at least one notification that should be visible right now */ public boolean hasActiveNotifications() { return mReadOnlyNotifications.size() != 0; public boolean hasVisibleNotifications() { if (mReadOnlyNotifications.size() == 0) { return false; } // Filter out suppressed notifications, which are active notifications backing a bubble // but are not present in the shade for (NotificationEntry e : mSortedAndFiltered) { if (!mBubbleControllerLazy.get().isBubbleNotificationSuppressedFromShade(e)) { return true; } } return false; } @Override Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java +2 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,7 @@ public interface NotificationsModule { Lazy<NotificationRowBinder> notificationRowBinderLazy, Lazy<NotificationRemoteInputManager> notificationRemoteInputManagerLazy, LeakDetector leakDetector, Lazy<BubbleController> bubbleController, ForegroundServiceDismissalFeatureController fgsFeatureController) { return new NotificationEntryManager( logger, Loading @@ -97,6 +98,7 @@ public interface NotificationsModule { notificationRowBinderLazy, notificationRemoteInputManagerLazy, leakDetector, bubbleController, fgsFeatureController); } Loading Loading
core/java/com/android/internal/policy/GestureNavigationSettingsObserver.java +5 −2 Original line number Diff line number Diff line Loading @@ -103,8 +103,11 @@ public class GestureNavigationSettingsObserver extends ContentObserver { final DisplayMetrics dm = userRes.getDisplayMetrics(); final float defaultInset = userRes.getDimension( com.android.internal.R.dimen.config_backGestureInset) / dm.density; final float backGestureInset = DeviceConfig.getFloat(DeviceConfig.NAMESPACE_SYSTEMUI, BACK_GESTURE_EDGE_WIDTH, defaultInset); // Only apply the back gesture config if there is an existing inset final float backGestureInset = defaultInset > 0 ? DeviceConfig.getFloat(DeviceConfig.NAMESPACE_SYSTEMUI, BACK_GESTURE_EDGE_WIDTH, defaultInset) : defaultInset; final float inset = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, backGestureInset, dm); final float scale = Settings.Secure.getFloatForUser( Loading
packages/SystemUI/src/com/android/systemui/media/MediaCarouselController.kt +1 −0 Original line number Diff line number Diff line Loading @@ -135,6 +135,7 @@ class MediaCarouselController @Inject constructor( } override fun onOverlayChanged() { recreatePlayers() inflateSettingsButton() } Loading
packages/SystemUI/src/com/android/systemui/media/SeekBarObserver.kt +6 −6 Original line number Diff line number Diff line Loading @@ -55,16 +55,16 @@ class SeekBarObserver(private val holder: PlayerViewHolder) : Observer<SeekBarVi holder.seekBar.maxHeight = seekBarDefaultMaxHeight } data.elapsedTime?.let { holder.seekBar.setProgress(it) holder.elapsedTimeView.setText(DateUtils.formatElapsedTime( it / DateUtils.SECOND_IN_MILLIS)) } data.duration?.let { holder.seekBar.setMax(it) holder.totalTimeView.setText(DateUtils.formatElapsedTime( it / DateUtils.SECOND_IN_MILLIS)) } data.elapsedTime?.let { holder.seekBar.setProgress(it) holder.elapsedTimeView.setText(DateUtils.formatElapsedTime( it / DateUtils.SECOND_IN_MILLIS)) } } }
packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java +19 −2 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import android.util.Log; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.statusbar.NotificationVisibility; import com.android.systemui.Dumpable; import com.android.systemui.bubbles.BubbleController; import com.android.systemui.statusbar.FeatureFlags; import com.android.systemui.statusbar.NotificationLifetimeExtender; import com.android.systemui.statusbar.NotificationListener; Loading Loading @@ -189,6 +190,8 @@ public class NotificationEntryManager implements } } private final Lazy<BubbleController> mBubbleControllerLazy; /** * Injected constructor. See {@link NotificationsModule}. */ Loading @@ -201,6 +204,7 @@ public class NotificationEntryManager implements Lazy<NotificationRowBinder> notificationRowBinderLazy, Lazy<NotificationRemoteInputManager> notificationRemoteInputManagerLazy, LeakDetector leakDetector, Lazy<BubbleController> bubbleController, ForegroundServiceDismissalFeatureController fgsFeatureController) { mLogger = logger; mGroupManager = groupManager; Loading @@ -211,6 +215,7 @@ public class NotificationEntryManager implements mRemoteInputManagerLazy = notificationRemoteInputManagerLazy; mLeakDetector = leakDetector; mFgsFeatureController = fgsFeatureController; mBubbleControllerLazy = bubbleController; } /** Once called, the NEM will start processing notification events from system server. */ Loading Loading @@ -920,8 +925,20 @@ public class NotificationEntryManager implements /** * @return {@code true} if there is at least one notification that should be visible right now */ public boolean hasActiveNotifications() { return mReadOnlyNotifications.size() != 0; public boolean hasVisibleNotifications() { if (mReadOnlyNotifications.size() == 0) { return false; } // Filter out suppressed notifications, which are active notifications backing a bubble // but are not present in the shade for (NotificationEntry e : mSortedAndFiltered) { if (!mBubbleControllerLazy.get().isBubbleNotificationSuppressedFromShade(e)) { return true; } } return false; } @Override Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java +2 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,7 @@ public interface NotificationsModule { Lazy<NotificationRowBinder> notificationRowBinderLazy, Lazy<NotificationRemoteInputManager> notificationRemoteInputManagerLazy, LeakDetector leakDetector, Lazy<BubbleController> bubbleController, ForegroundServiceDismissalFeatureController fgsFeatureController) { return new NotificationEntryManager( logger, Loading @@ -97,6 +98,7 @@ public interface NotificationsModule { notificationRowBinderLazy, notificationRemoteInputManagerLazy, leakDetector, bubbleController, fgsFeatureController); } Loading