diff --git a/README.md b/README.md index 7a5c8cc..79216c5 100644 --- a/README.md +++ b/README.md @@ -76,9 +76,9 @@ should. | Module loads in SystemUI | ✅ | Untested | Untested | ✅ | Untested | Untested | Untested | Untested | | Settings app opens and writes settings | ✅ | Untested | Untested | ✅ opens; settings provider applies | Untested | Untested | Untested | Untested | | Custom unlocked statusbar layout | ✅ | Untested | Untested | ✅ basic unlocked layout verified | Untested | Untested | Untested | Untested | -| Custom lockscreen statusbar layout | ✅ | Untested | Untested | Untested | Untested | Untested | Untested | Untested | +| Custom lockscreen statusbar layout | ✅ | Untested | Untested | ✅ basic keyguard layout verified | Untested | Untested | Untested | Untested | | Custom AOD statusbar layout | ✅ | Untested | Untested | ❌ OneUI AOD hooks only | Untested | Untested | Untested | Untested | -| Notification icons mode | ✅ | Untested | Untested | ✅ unlocked icons verified; lockscreen/AOD untested | Untested | Untested | Untested | Untested | +| Notification icons mode | ✅ | Untested | Untested | ✅ unlocked and lockscreen hosts verified; AOD unsupported | Untested | Untested | Untested | Untested | | Notification cards mode | ✅ | Untested | Untested | ❌ OneUI cards mode only | Untested | Untested | Untested | Untested | | Notification dot mode and read-state behavior | ✅ | Untested | Untested | Untested; lockscreen/AOD style detection is OneUI-specific | Untested | Untested | Untested | Untested | | Hide notification icons by app | ✅ | Untested | Untested | Untested | Untested | Untested | Untested | Untested | @@ -90,14 +90,14 @@ should. | Custom statusbar clock text | ✅ | Untested | Untested | ✅ layout-on and layout-off clocks verified | Untested | Untested | Untested | Untested | | Custom drawer clock/date text | ✅ | Untested | Untested | ✅ expanded QS clock/date verified | Untested | Untested | Untested | Untested | | Stored clock pattern previews | ✅ | Untested | Untested | Untested | Untested | Untested | Untested | Untested | -| Battery bar: base statusbar modes | ✅ | Untested | Untested | ✅ unlocked verified; lockscreen/AOD untested | Untested | Untested | Untested | Untested | +| Battery bar: base statusbar modes | ✅ | Untested | Untested | ✅ unlocked and lockscreen verified; AOD unsupported | Untested | Untested | Untested | Untested | | Battery bar: fullscreen and transparent statusbar modes | ✅ | Untested | Untested | ✅ fullscreen root verified; transparent untested | Untested | Untested | Untested | Untested | | Battery bar: curved top-edge geometry | ✅ | Untested | Untested | Untested; emulator has no curved screen edge | Untested | Untested | Untested | Untested | | Battery bar threshold colours and colour math | ✅ | Untested | Untested | Untested | Untested | Untested | Untested | Untested | | Camera cutout and under-display-camera handling | ✅ | Untested | Untested | Untested; emulator has no cutout/UDC | Untested | Untested | Untested | Untested | | Rotation and fold/unfold handling | ✅ | Untested | Untested | Untested | Untested | Untested | Untested | Untested | | Drawer scrolling and background-work performance | ✅ | Untested | Untested | Untested | Untested | Untested | Untested | Untested | -| Debug visualizers and debug notifications | ✅ | Untested | Untested | ✅ unlocked visualizers verified; debug notifications untested | Untested | Untested | Untested | Untested | +| Debug visualizers and debug notifications | ✅ | Untested | Untested | ✅ unlocked and lockscreen visualizers verified; debug notifications untested | Untested | Untested | Untested | Untested | Current emulator targets use rooted LSPosed snapshots in a local test lab. They are useful for compatibility work, but the matrix above is intentionally not diff --git a/app/src/main/java/se/ajpanton/statusbartweak/runtime/layout/StockLayoutCanvasController.java b/app/src/main/java/se/ajpanton/statusbartweak/runtime/layout/StockLayoutCanvasController.java index d7146d5..ac25410 100644 --- a/app/src/main/java/se/ajpanton/statusbartweak/runtime/layout/StockLayoutCanvasController.java +++ b/app/src/main/java/se/ajpanton/statusbartweak/runtime/layout/StockLayoutCanvasController.java @@ -2283,27 +2283,25 @@ final class StockLayoutCanvasController { Context context = root.getContext(); SbtSettings settings = RuntimeSettingsCache.get(context); boolean layoutEnabled = settings.clockEnabled; - boolean statusBarRoot = isUnlockedStatusBarRoot(root); + runtimeContext.getModeStateRepository().setLayoutEnabled(layoutEnabled); + updateActiveScene(root, context); + SceneKey activeScene = runtimeContext.getModeStateRepository().getActiveScene(); + boolean statusBarRoot = isStatusBarLayoutRoot(root, activeScene); markDirtyIfSettingsChanged(root, settings, statusBarRoot); markDirtyIfClockTimeChanged(root, settings, statusBarRoot); - runtimeContext.getModeStateRepository().setLayoutEnabled(layoutEnabled); if (!layoutEnabled) { - updateActiveScene(root, context); - SceneKey activeScene = runtimeContext.getModeStateRepository().getActiveScene(); statusIconModelTracker.updateActiveSlots(false, activeScene); applyLayoutOffRoot(root, settings, statusBarRoot, activeScene); return; } installPendingPluginClassLoaderHooks(); layoutOffCleanedRoots.remove(root); - updateActiveScene(root, context); if (statusIconModelTracker.updateActiveSlots( true, - runtimeContext.getModeStateRepository().getActiveScene())) { + activeScene)) { unlockedIconRenderController.clearRoot(root); dirtyUnlockedLayoutRoots.add(root); } - SceneKey activeScene = runtimeContext.getModeStateRepository().getActiveScene(); boolean unlockedScene = activeScene != null && activeScene.isUnlocked(); boolean aodScene = activeScene != null && activeScene.isAod(); boolean rootDirty = dirtyUnlockedLayoutRoots.remove(root); @@ -4964,7 +4962,7 @@ final class StockLayoutCanvasController { View root, SceneKey activeScene ) { - if (!isUnlockedStatusBarRoot(root) + if (!isStatusBarLayoutRoot(root, activeScene) && !(activeScene != null && activeScene.isAod() && isAodLayoutRoot(root))) { return null; } @@ -5021,11 +5019,27 @@ final class StockLayoutCanvasController { || className.contains("StatusBarWindowView"); } + private boolean isStatusBarLayoutRoot(View root, SceneKey activeScene) { + return isUnlockedStatusBarRoot(root) + || (activeScene != null + && activeScene.isLockscreen() + && isNotificationShadeWindowRoot(root)); + } + private void updateActiveScene(View root, Context context) { if (root == null) { return; } if (runtimeContext.getModeStateRepository().hasSystemUiStatusBarState()) { + if (isNotificationShadeWindowRoot(root) && isKeyguardLocked(context)) { + NotificationDisplayStyle notificationStyle = + SystemNotificationDisplayStyleDetector.read(context); + if (isInteractive(context)) { + runtimeContext.getModeStateRepository().setLockscreen(notificationStyle); + } else { + runtimeContext.getModeStateRepository().setAod(notificationStyle); + } + } return; } NotificationDisplayStyle notificationStyle =