Add experimental generic AOD compatibility
This commit is contained in:
@@ -64,12 +64,13 @@ until the compatibility matrix says otherwise.
|
|||||||
|
|
||||||
## Device Compatibility
|
## Device Compatibility
|
||||||
|
|
||||||
Some behavior cannot be fully verified on emulators. In particular, smooth
|
Some behavior cannot be fully verified on emulators. Emulator testing can still
|
||||||
transitions between AOD, lockscreen, unlocked mode, and fullscreen apps may need
|
verify whether hooks load, whether SystemUI stays stable, whether settings apply,
|
||||||
physical-device testing. Emulator testing can still verify whether hooks load,
|
whether excessive background work appears in logs, and whether the steady state
|
||||||
whether SystemUI stays stable, whether settings apply, whether excessive
|
looks the way it should.
|
||||||
background work appears in logs, and whether the steady state looks the way it
|
|
||||||
should.
|
`⚠️ Experimental` means best-effort support exists, but the emulator cannot
|
||||||
|
expose the required hardware or state for real verification.
|
||||||
|
|
||||||
| Feature | Galaxy Z Fold5<br>One UI 8 / Android 16 | AOSP API 34<br>Android 14 | AOSP API 35<br>Android 15 | AOSP API 36<br>Android 16 | Google APIs API 35<br>Android 15 | Google APIs API 36<br>Android 16 | LineageOS 22<br>Android 15 | LineageOS 23<br>Android 16 |
|
| Feature | Galaxy Z Fold5<br>One UI 8 / Android 16 | AOSP API 34<br>Android 14 | AOSP API 35<br>Android 15 | AOSP API 36<br>Android 16 | Google APIs API 35<br>Android 15 | Google APIs API 36<br>Android 16 | LineageOS 22<br>Android 15 | LineageOS 23<br>Android 16 |
|
||||||
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
||||||
@@ -77,26 +78,26 @@ should.
|
|||||||
| Settings app opens and writes settings | ✅ | Untested | Untested | ✅ | Untested | Untested | Untested | Untested |
|
| Settings app opens and writes settings | ✅ | Untested | Untested | ✅ | Untested | Untested | Untested | Untested |
|
||||||
| Custom unlocked statusbar layout | ✅ | Untested | Untested | ✅ | Untested | Untested | Untested | Untested |
|
| Custom unlocked statusbar layout | ✅ | Untested | Untested | ✅ | Untested | Untested | Untested | Untested |
|
||||||
| Custom lockscreen statusbar layout | ✅ | Untested | Untested | ✅ | Untested | Untested | Untested | Untested |
|
| Custom lockscreen statusbar layout | ✅ | Untested | Untested | ✅ | Untested | Untested | Untested | Untested |
|
||||||
| Custom AOD statusbar layout | ✅ | Untested | Untested | ❌ OneUI AOD hooks only; AOSP emulator has no visible AOD/doze statusbar surface | Untested | Untested | Untested | Untested |
|
| Custom AOD statusbar layout | ✅ | Untested | Untested | ⚠️ Experimental | Untested | Untested | Untested | Untested |
|
||||||
| Notification icons mode | ✅ | Untested | Untested | ✅ unlocked and lockscreen hosts verified; AOD unsupported | Untested | Untested | Untested | Untested |
|
| Notification icons mode | ✅ | Untested | Untested | ✅ AOD experimental | Untested | Untested | Untested | Untested |
|
||||||
| Notification cards mode | ✅ | Untested | Untested | ❌ OneUI cards mode only | Untested | Untested | Untested | Untested |
|
| Notification cards mode | ✅ | Untested | Untested | ❌ | Untested | Untested | Untested | Untested |
|
||||||
| Notification dot mode and read-state behavior | ✅ | Untested | Untested | ❌ OneUI lockscreen/AOD style only | Untested | Untested | Untested | Untested |
|
| Notification dot mode and read-state behavior | ✅ | Untested | Untested | ❌ | Untested | Untested | Untested | Untested |
|
||||||
| Hide notification icons by app | ✅ | Untested | Untested | ✅ | Untested | Untested | Untested | Untested |
|
| Hide notification icons by app | ✅ | Untested | Untested | ✅ AOD experimental | Untested | Untested | Untested | Untested |
|
||||||
| Hide status icons | ✅ | Untested | Untested | ✅ | Untested | Untested | Untested | Untested |
|
| Hide status icons | ✅ | Untested | Untested | ✅ AOD experimental | Untested | Untested | Untested | Untested |
|
||||||
| Dual-SIM status icon handling | ✅ | Untested | Untested | Untested; emulator has no dual-SIM signal state | Untested | Untested | Untested | Untested |
|
| Dual-SIM status icon handling | ✅ | Untested | Untested | ⚠️ Experimental | Untested | Untested | Untested | Untested |
|
||||||
| Samsung status chips: media/navigation/call | ✅ | Untested | Untested | ❌ OneUI-only | Untested | Untested | Untested | Untested |
|
| Samsung status chips: media/navigation/call | ✅ | Untested | Untested | ❌ | Untested | Untested | Untested | Untested |
|
||||||
| Samsung charging chip handling | ✅ | Untested | Untested | ❌ OneUI-only | Untested | Untested | Untested | Untested |
|
| Samsung charging chip handling | ✅ | Untested | Untested | ❌ | Untested | Untested | Untested | Untested |
|
||||||
| Privacy indicator stability | ✅ | Untested | Untested | ✅ | Untested | Untested | Untested | Untested |
|
| Privacy indicator stability | ✅ | Untested | Untested | ✅ | Untested | Untested | Untested | Untested |
|
||||||
| Custom statusbar clock text | ✅ | Untested | Untested | ✅ | Untested | Untested | Untested | Untested |
|
| Custom statusbar clock text | ✅ | Untested | Untested | ✅ | Untested | Untested | Untested | Untested |
|
||||||
| Custom drawer clock/date text | ✅ | Untested | Untested | ✅ | Untested | Untested | Untested | Untested |
|
| Custom drawer clock/date text | ✅ | Untested | Untested | ✅ | Untested | Untested | Untested | Untested |
|
||||||
| Stored clock pattern previews | ✅ | Untested | Untested | ✅ | Untested | Untested | Untested | Untested |
|
| Stored clock pattern previews | ✅ | Untested | Untested | ✅ | Untested | Untested | Untested | Untested |
|
||||||
| Battery bar: base statusbar modes | ✅ | Untested | Untested | ✅ unlocked and lockscreen verified; AOD unsupported | Untested | Untested | Untested | Untested |
|
| Battery bar: base statusbar modes | ✅ | Untested | Untested | ✅ | Untested | Untested | Untested | Untested |
|
||||||
| Battery bar: fullscreen and transparent statusbar modes | ✅ | Untested | Untested | ✅ | Untested | Untested | Untested | Untested |
|
| Battery bar: fullscreen and transparent statusbar modes | ✅ | Untested | 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: curved top-edge geometry | ✅ | Untested | Untested | ⚠️ Experimental | Untested | Untested | Untested | Untested |
|
||||||
| Battery bar threshold colours and colour math | ✅ | Untested | Untested | ✅ | Untested | Untested | Untested | Untested |
|
| Battery bar threshold colours and colour math | ✅ | 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 |
|
| Camera cutout and under-display-camera handling | ✅ | Untested | Untested | ⚠️ Experimental | Untested | Untested | Untested | Untested |
|
||||||
| Rotation and fold/unfold handling | ✅ | Untested | Untested | ✅ rotation verified; fold/unfold not applicable to this emulator | Untested | Untested | Untested | Untested |
|
| Rotation and fold/unfold handling | ✅ | Untested | Untested | ✅ rotation verified; fold/unfold not applicable to this emulator | Untested | Untested | Untested | Untested |
|
||||||
| Drawer scrolling and background-work performance | ✅ | Untested | Untested | ✅ no excessive work seen in emulator drawer test; physical smoothness not verified | Untested | Untested | Untested | Untested |
|
| Drawer scrolling and background-work performance | ✅ | Untested | Untested | ✅ | Untested | Untested | Untested | Untested |
|
||||||
| Debug visualizers and debug notifications | ✅ | Untested | Untested | ✅ | Untested | Untested | Untested | Untested |
|
| Debug visualizers and debug notifications | ✅ | Untested | Untested | ✅ | Untested | Untested | Untested | Untested |
|
||||||
|
|
||||||
Current emulator targets use rooted LSPosed snapshots in a local test lab. They
|
Current emulator targets use rooted LSPosed snapshots in a local test lab. They
|
||||||
|
|||||||
+23
-4
@@ -1434,7 +1434,7 @@ final class StockLayoutCanvasController {
|
|||||||
}
|
}
|
||||||
hideLockscreenCardsNotificationHost(root);
|
hideLockscreenCardsNotificationHost(root);
|
||||||
if (activeScene.notificationDisplayStyle() == NotificationDisplayStyle.CARDS
|
if (activeScene.notificationDisplayStyle() == NotificationDisplayStyle.CARDS
|
||||||
&& isAodLayoutRoot(root)) {
|
&& isAodLayoutRoot(root, activeScene)) {
|
||||||
renderAodCardsNotificationStripIfNeeded(root, settings, activeScene);
|
renderAodCardsNotificationStripIfNeeded(root, settings, activeScene);
|
||||||
} else {
|
} else {
|
||||||
removeAodCardsNotificationHost(root);
|
removeAodCardsNotificationHost(root);
|
||||||
@@ -2308,7 +2308,7 @@ final class StockLayoutCanvasController {
|
|||||||
boolean unlockedScene = activeScene != null && activeScene.isUnlocked();
|
boolean unlockedScene = activeScene != null && activeScene.isUnlocked();
|
||||||
boolean aodScene = activeScene != null && activeScene.isAod();
|
boolean aodScene = activeScene != null && activeScene.isAod();
|
||||||
boolean rootDirty = dirtyUnlockedLayoutRoots.remove(root);
|
boolean rootDirty = dirtyUnlockedLayoutRoots.remove(root);
|
||||||
boolean aodLayoutRoot = aodScene && isAodLayoutRoot(root);
|
boolean aodLayoutRoot = aodScene && isAodLayoutRoot(root, activeScene);
|
||||||
boolean hasAodLayoutPlan = aodScene && unlockedIconRenderController.hasLayoutPlan(root);
|
boolean hasAodLayoutPlan = aodScene && unlockedIconRenderController.hasLayoutPlan(root);
|
||||||
boolean layoutRoot = aodScene ? aodLayoutRoot : statusBarRoot;
|
boolean layoutRoot = aodScene ? aodLayoutRoot : statusBarRoot;
|
||||||
if (aodScene
|
if (aodScene
|
||||||
@@ -4996,7 +4996,8 @@ final class StockLayoutCanvasController {
|
|||||||
SceneKey activeScene
|
SceneKey activeScene
|
||||||
) {
|
) {
|
||||||
if (!isStatusBarLayoutRoot(root, activeScene)
|
if (!isStatusBarLayoutRoot(root, activeScene)
|
||||||
&& !(activeScene != null && activeScene.isAod() && isAodLayoutRoot(root))) {
|
&& !(activeScene != null && activeScene.isAod()
|
||||||
|
&& isAodLayoutRoot(root, activeScene))) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (activeScene != null
|
if (activeScene != null
|
||||||
@@ -5100,7 +5101,25 @@ final class StockLayoutCanvasController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean isAodLayoutRoot(View root) {
|
private boolean isAodLayoutRoot(View root) {
|
||||||
return isAodRoot(root) || hasConfirmedAodPluginDescendant(root);
|
return isAodLayoutRoot(root, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isAodLayoutRoot(View root, SceneKey activeScene) {
|
||||||
|
return isAodRoot(root)
|
||||||
|
|| hasConfirmedAodPluginDescendant(root)
|
||||||
|
|| isExperimentalAodStatusBarRoot(root, activeScene);
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isExperimentalAodStatusBarRoot(View root, SceneKey activeScene) {
|
||||||
|
if (root == null
|
||||||
|
|| activeScene == null
|
||||||
|
|| !activeScene.isAod()
|
||||||
|
|| isSamsungDevice()
|
||||||
|
|| !isUnlockedStatusBarRoot(root)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
SbtSettings settings = RuntimeSettingsCache.get(root.getContext());
|
||||||
|
return settings.debugExperimentalAodStatusbarRoot;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean hasConfirmedAodPluginDescendant(View root) {
|
private boolean hasConfirmedAodPluginDescendant(View root) {
|
||||||
|
|||||||
+5
-1
@@ -2,6 +2,7 @@ package se.ajpanton.statusbartweak.runtime.render;
|
|||||||
|
|
||||||
import android.app.KeyguardManager;
|
import android.app.KeyguardManager;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.os.Build;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
@@ -464,7 +465,10 @@ public final class UnlockedIconSnapshotRenderController {
|
|||||||
NotificationDisplayStyle style = scene.notificationDisplayStyle();
|
NotificationDisplayStyle style = scene.notificationDisplayStyle();
|
||||||
return settings.layoutNotifEnabledAod
|
return settings.layoutNotifEnabledAod
|
||||||
&& (style == NotificationDisplayStyle.ICONS
|
&& (style == NotificationDisplayStyle.ICONS
|
||||||
|| style == NotificationDisplayStyle.DOT);
|
|| style == NotificationDisplayStyle.DOT
|
||||||
|
|| (style == NotificationDisplayStyle.UNKNOWN
|
||||||
|
&& settings.debugExperimentalAodStatusbarRoot
|
||||||
|
&& !"samsung".equalsIgnoreCase(Build.MANUFACTURER)));
|
||||||
}
|
}
|
||||||
return settings.layoutNotifEnabledUnlocked;
|
return settings.layoutNotifEnabledUnlocked;
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-1
@@ -1,6 +1,7 @@
|
|||||||
package se.ajpanton.statusbartweak.runtime.render;
|
package se.ajpanton.statusbartweak.runtime.render;
|
||||||
|
|
||||||
import android.graphics.Rect;
|
import android.graphics.Rect;
|
||||||
|
import android.os.Build;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
@@ -856,7 +857,9 @@ final class UnlockedLayoutPlanner {
|
|||||||
if (style == NotificationDisplayStyle.DOT) {
|
if (style == NotificationDisplayStyle.DOT) {
|
||||||
return settings.layoutNotifEnabledAod ? 1 : 0;
|
return settings.layoutNotifEnabledAod ? 1 : 0;
|
||||||
}
|
}
|
||||||
if (style != NotificationDisplayStyle.ICONS) {
|
if (style != NotificationDisplayStyle.ICONS
|
||||||
|
&& !(style == NotificationDisplayStyle.UNKNOWN
|
||||||
|
&& isExperimentalGenericAod(settings))) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return settings.layoutNotifEnabledAod ? settings.layoutNotifAodCount : 0;
|
return settings.layoutNotifEnabledAod ? settings.layoutNotifAodCount : 0;
|
||||||
@@ -870,6 +873,12 @@ final class UnlockedLayoutPlanner {
|
|||||||
&& scene.notificationDisplayStyle() == NotificationDisplayStyle.DOT;
|
&& scene.notificationDisplayStyle() == NotificationDisplayStyle.DOT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isExperimentalGenericAod(SbtSettings settings) {
|
||||||
|
return settings != null
|
||||||
|
&& settings.debugExperimentalAodStatusbarRoot
|
||||||
|
&& !"samsung".equalsIgnoreCase(Build.MANUFACTURER);
|
||||||
|
}
|
||||||
|
|
||||||
private ArrayList<SnapshotPlacement> unreadNotificationPlacements(
|
private ArrayList<SnapshotPlacement> unreadNotificationPlacements(
|
||||||
ArrayList<SnapshotPlacement> placements
|
ArrayList<SnapshotPlacement> placements
|
||||||
) {
|
) {
|
||||||
|
|||||||
+36
-10
@@ -4,6 +4,7 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.Rect;
|
import android.graphics.Rect;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.BatteryManager;
|
import android.os.BatteryManager;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@@ -63,7 +64,7 @@ final class UnlockedStockSourceCollector {
|
|||||||
ArrayList<SnapshotSource> statusChips = new ArrayList<>();
|
ArrayList<SnapshotSource> statusChips = new ArrayList<>();
|
||||||
ArrayList<SnapshotSource> statusChipMetrics = new ArrayList<>();
|
ArrayList<SnapshotSource> statusChipMetrics = new ArrayList<>();
|
||||||
if (scene != null && scene.isAod()) {
|
if (scene != null && scene.isAod()) {
|
||||||
collectAodStatusSnapshotViews(root, statusIcons, scene);
|
collectAodStatusSnapshotViews(root, statusIcons, scene, settings);
|
||||||
}
|
}
|
||||||
if (statusIcons.isEmpty()) {
|
if (statusIcons.isEmpty()) {
|
||||||
if (anchors.statusRoot != null) {
|
if (anchors.statusRoot != null) {
|
||||||
@@ -82,8 +83,7 @@ final class UnlockedStockSourceCollector {
|
|||||||
selectDualSimStatusSignals(statusIcons, settings);
|
selectDualSimStatusSignals(statusIcons, settings);
|
||||||
normalizeStatusIconSourceBounds(root, statusIcons);
|
normalizeStatusIconSourceBounds(root, statusIcons);
|
||||||
if (scene != null && scene.isAod()) {
|
if (scene != null && scene.isAod()) {
|
||||||
if (scene.notificationDisplayStyle() == NotificationDisplayStyle.ICONS
|
if (isAodIconNotificationStyle(scene, settings)) {
|
||||||
|| scene.notificationDisplayStyle() == NotificationDisplayStyle.DOT) {
|
|
||||||
notificationIcons.addAll(
|
notificationIcons.addAll(
|
||||||
LockscreenCardsNotificationIconSourceStore.snapshotSourcesForAodIconsRoot(root));
|
LockscreenCardsNotificationIconSourceStore.snapshotSourcesForAodIconsRoot(root));
|
||||||
if (notificationIcons.isEmpty()
|
if (notificationIcons.isEmpty()
|
||||||
@@ -92,6 +92,12 @@ final class UnlockedStockSourceCollector {
|
|||||||
LockscreenCardsNotificationIconSourceStore
|
LockscreenCardsNotificationIconSourceStore
|
||||||
.snapshotAodNotificationPackageSources(root));
|
.snapshotAodNotificationPackageSources(root));
|
||||||
}
|
}
|
||||||
|
if (notificationIcons.isEmpty() && isExperimentalGenericAod(settings)) {
|
||||||
|
View notificationRoot = anchors != null && anchors.notificationRoot != null
|
||||||
|
? anchors.notificationRoot
|
||||||
|
: root;
|
||||||
|
collectNotificationSnapshotViews(notificationRoot, notificationIcons);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (anchors.notificationRoot != null) {
|
} else if (anchors.notificationRoot != null) {
|
||||||
collectNotificationSnapshotViews(anchors.notificationRoot, notificationIcons);
|
collectNotificationSnapshotViews(anchors.notificationRoot, notificationIcons);
|
||||||
@@ -111,14 +117,14 @@ final class UnlockedStockSourceCollector {
|
|||||||
private void collectAodStatusSnapshotViews(
|
private void collectAodStatusSnapshotViews(
|
||||||
View root,
|
View root,
|
||||||
ArrayList<SnapshotSource> out,
|
ArrayList<SnapshotSource> out,
|
||||||
SceneKey scene
|
SceneKey scene,
|
||||||
|
SbtSettings settings
|
||||||
) {
|
) {
|
||||||
if (root == null || out == null) {
|
if (root == null || out == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
boolean iconMode = scene != null
|
boolean iconMode = scene != null
|
||||||
&& (scene.notificationDisplayStyle() == NotificationDisplayStyle.ICONS
|
&& isAodIconNotificationStyle(scene, settings);
|
||||||
|| scene.notificationDisplayStyle() == NotificationDisplayStyle.DOT);
|
|
||||||
View excludedNotificationContainer = iconMode
|
View excludedNotificationContainer = iconMode
|
||||||
? LockscreenCardsNotificationIconSourceStore.sourceContainerForAodIconsRoot(root)
|
? LockscreenCardsNotificationIconSourceStore.sourceContainerForAodIconsRoot(root)
|
||||||
: LockscreenCardsNotificationIconSourceStore.sourceContainerForRoot(root);
|
: LockscreenCardsNotificationIconSourceStore.sourceContainerForRoot(root);
|
||||||
@@ -129,6 +135,22 @@ final class UnlockedStockSourceCollector {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isAodIconNotificationStyle(SceneKey scene, SbtSettings settings) {
|
||||||
|
if (scene == null || !scene.isAod()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
NotificationDisplayStyle style = scene.notificationDisplayStyle();
|
||||||
|
return style == NotificationDisplayStyle.ICONS
|
||||||
|
|| style == NotificationDisplayStyle.DOT
|
||||||
|
|| (style == NotificationDisplayStyle.UNKNOWN && isExperimentalGenericAod(settings));
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isExperimentalGenericAod(SbtSettings settings) {
|
||||||
|
return settings != null
|
||||||
|
&& settings.debugExperimentalAodStatusbarRoot
|
||||||
|
&& !"samsung".equalsIgnoreCase(Build.MANUFACTURER);
|
||||||
|
}
|
||||||
|
|
||||||
private String reflectString(View view, String methodName, String... fieldNames) {
|
private String reflectString(View view, String methodName, String... fieldNames) {
|
||||||
Object methodValue = ReflectionSupport.invokeMethod(view, methodName);
|
Object methodValue = ReflectionSupport.invokeMethod(view, methodName);
|
||||||
if (methodValue != null) {
|
if (methodValue != null) {
|
||||||
@@ -193,7 +215,7 @@ final class UnlockedStockSourceCollector {
|
|||||||
statusSourceSignature = 31 * statusSourceSignature + batteryChargingSignature(root);
|
statusSourceSignature = 31 * statusSourceSignature + batteryChargingSignature(root);
|
||||||
if (scene != null && scene.isAod()) {
|
if (scene != null && scene.isAod()) {
|
||||||
statusSourceSignature = 31 * statusSourceSignature
|
statusSourceSignature = 31 * statusSourceSignature
|
||||||
+ aodLayoutAnchorSignature(root, anchors, scene);
|
+ aodLayoutAnchorSignature(root, anchors, scene, settings);
|
||||||
}
|
}
|
||||||
int notificationSourceSignature = sourceLayoutListSignature(
|
int notificationSourceSignature = sourceLayoutListSignature(
|
||||||
previousIcons != null ? previousIcons.notificationIcons : null);
|
previousIcons != null ? previousIcons.notificationIcons : null);
|
||||||
@@ -238,13 +260,17 @@ final class UnlockedStockSourceCollector {
|
|||||||
chipSourceSignature);
|
chipSourceSignature);
|
||||||
}
|
}
|
||||||
|
|
||||||
private int aodLayoutAnchorSignature(View root, RootAnchors anchors, SceneKey scene) {
|
private int aodLayoutAnchorSignature(
|
||||||
|
View root,
|
||||||
|
RootAnchors anchors,
|
||||||
|
SceneKey scene,
|
||||||
|
SbtSettings settings
|
||||||
|
) {
|
||||||
if (root == null) {
|
if (root == null) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
boolean iconMode = scene != null
|
boolean iconMode = scene != null
|
||||||
&& (scene.notificationDisplayStyle() == NotificationDisplayStyle.ICONS
|
&& isAodIconNotificationStyle(scene, settings);
|
||||||
|| scene.notificationDisplayStyle() == NotificationDisplayStyle.DOT);
|
|
||||||
View notificationContainer = iconMode
|
View notificationContainer = iconMode
|
||||||
? LockscreenCardsNotificationIconSourceStore.sourceContainerForAodIconsRoot(root)
|
? LockscreenCardsNotificationIconSourceStore.sourceContainerForAodIconsRoot(root)
|
||||||
: LockscreenCardsNotificationIconSourceStore.sourceContainerForRoot(root);
|
: LockscreenCardsNotificationIconSourceStore.sourceContainerForRoot(root);
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ public final class SbtDefaults {
|
|||||||
public static final boolean DEBUG_VISUALIZE_CHIP_CONTAINER_DEFAULT = false;
|
public static final boolean DEBUG_VISUALIZE_CHIP_CONTAINER_DEFAULT = false;
|
||||||
public static final boolean DEBUG_VISUALIZE_CAMERA_CUTOUT_DEFAULT = false;
|
public static final boolean DEBUG_VISUALIZE_CAMERA_CUTOUT_DEFAULT = false;
|
||||||
public static final boolean DEBUG_VISUALIZE_AOD_STOCK_CONTAINERS_DEFAULT = false;
|
public static final boolean DEBUG_VISUALIZE_AOD_STOCK_CONTAINERS_DEFAULT = false;
|
||||||
|
public static final boolean DEBUG_EXPERIMENTAL_AOD_STATUSBAR_ROOT_DEFAULT = false;
|
||||||
|
|
||||||
public static final int LAYOUT_PADDING_CUTOUT_PX_DEFAULT = 0;
|
public static final int LAYOUT_PADDING_CUTOUT_PX_DEFAULT = 0;
|
||||||
public static final int LAYOUT_PADDING_LEFT_PX_DEFAULT = 0;
|
public static final int LAYOUT_PADDING_LEFT_PX_DEFAULT = 0;
|
||||||
|
|||||||
@@ -39,6 +39,8 @@ public final class SbtSettings {
|
|||||||
"debug_visualize_camera_cutout";
|
"debug_visualize_camera_cutout";
|
||||||
public static final String KEY_DEBUG_VISUALIZE_AOD_STOCK_CONTAINERS =
|
public static final String KEY_DEBUG_VISUALIZE_AOD_STOCK_CONTAINERS =
|
||||||
"debug_visualize_aod_stock_containers";
|
"debug_visualize_aod_stock_containers";
|
||||||
|
public static final String KEY_DEBUG_EXPERIMENTAL_AOD_STATUSBAR_ROOT =
|
||||||
|
"debug_experimental_aod_statusbar_root";
|
||||||
public static final String KEY_LOCKED_NOTIFICATION_MODE =
|
public static final String KEY_LOCKED_NOTIFICATION_MODE =
|
||||||
"locked_notification_mode";
|
"locked_notification_mode";
|
||||||
public static final String KEY_UNLOCKED_MAX_ICONS_PER_ROW = "unlocked_max_icons_per_row";
|
public static final String KEY_UNLOCKED_MAX_ICONS_PER_ROW = "unlocked_max_icons_per_row";
|
||||||
@@ -425,6 +427,7 @@ public final class SbtSettings {
|
|||||||
public final boolean debugVisualizeChipContainer;
|
public final boolean debugVisualizeChipContainer;
|
||||||
public final boolean debugVisualizeCameraCutout;
|
public final boolean debugVisualizeCameraCutout;
|
||||||
public final boolean debugVisualizeAodStockContainers;
|
public final boolean debugVisualizeAodStockContainers;
|
||||||
|
public final boolean debugExperimentalAodStatusbarRoot;
|
||||||
|
|
||||||
private SbtSettings(boolean enableAodCutoutLimit,
|
private SbtSettings(boolean enableAodCutoutLimit,
|
||||||
boolean enableLockCutoutLimit,
|
boolean enableLockCutoutLimit,
|
||||||
@@ -558,7 +561,8 @@ public final class SbtSettings {
|
|||||||
boolean debugVisualizeClockContainer,
|
boolean debugVisualizeClockContainer,
|
||||||
boolean debugVisualizeChipContainer,
|
boolean debugVisualizeChipContainer,
|
||||||
boolean debugVisualizeCameraCutout,
|
boolean debugVisualizeCameraCutout,
|
||||||
boolean debugVisualizeAodStockContainers) {
|
boolean debugVisualizeAodStockContainers,
|
||||||
|
boolean debugExperimentalAodStatusbarRoot) {
|
||||||
this.enableAodCutoutLimit = enableAodCutoutLimit;
|
this.enableAodCutoutLimit = enableAodCutoutLimit;
|
||||||
this.enableLockCutoutLimit = enableLockCutoutLimit;
|
this.enableLockCutoutLimit = enableLockCutoutLimit;
|
||||||
this.unlockedMaxIconsPerRow = unlockedMaxIconsPerRow;
|
this.unlockedMaxIconsPerRow = unlockedMaxIconsPerRow;
|
||||||
@@ -861,6 +865,7 @@ public final class SbtSettings {
|
|||||||
this.debugVisualizeChipContainer = debugVisualizeChipContainer;
|
this.debugVisualizeChipContainer = debugVisualizeChipContainer;
|
||||||
this.debugVisualizeCameraCutout = debugVisualizeCameraCutout;
|
this.debugVisualizeCameraCutout = debugVisualizeCameraCutout;
|
||||||
this.debugVisualizeAodStockContainers = debugVisualizeAodStockContainers;
|
this.debugVisualizeAodStockContainers = debugVisualizeAodStockContainers;
|
||||||
|
this.debugExperimentalAodStatusbarRoot = debugExperimentalAodStatusbarRoot;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static SbtSettings defaults() {
|
public static SbtSettings defaults() {
|
||||||
@@ -997,7 +1002,8 @@ public final class SbtSettings {
|
|||||||
SbtDefaults.DEBUG_VISUALIZE_CLOCK_CONTAINER_DEFAULT,
|
SbtDefaults.DEBUG_VISUALIZE_CLOCK_CONTAINER_DEFAULT,
|
||||||
SbtDefaults.DEBUG_VISUALIZE_CHIP_CONTAINER_DEFAULT,
|
SbtDefaults.DEBUG_VISUALIZE_CHIP_CONTAINER_DEFAULT,
|
||||||
SbtDefaults.DEBUG_VISUALIZE_CAMERA_CUTOUT_DEFAULT,
|
SbtDefaults.DEBUG_VISUALIZE_CAMERA_CUTOUT_DEFAULT,
|
||||||
SbtDefaults.DEBUG_VISUALIZE_AOD_STOCK_CONTAINERS_DEFAULT
|
SbtDefaults.DEBUG_VISUALIZE_AOD_STOCK_CONTAINERS_DEFAULT,
|
||||||
|
SbtDefaults.DEBUG_EXPERIMENTAL_AOD_STATUSBAR_ROOT_DEFAULT
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1472,7 +1478,10 @@ public final class SbtSettings {
|
|||||||
SbtDefaults.DEBUG_VISUALIZE_CAMERA_CUTOUT_DEFAULT),
|
SbtDefaults.DEBUG_VISUALIZE_CAMERA_CUTOUT_DEFAULT),
|
||||||
prefs.getBoolean(
|
prefs.getBoolean(
|
||||||
KEY_DEBUG_VISUALIZE_AOD_STOCK_CONTAINERS,
|
KEY_DEBUG_VISUALIZE_AOD_STOCK_CONTAINERS,
|
||||||
SbtDefaults.DEBUG_VISUALIZE_AOD_STOCK_CONTAINERS_DEFAULT)
|
SbtDefaults.DEBUG_VISUALIZE_AOD_STOCK_CONTAINERS_DEFAULT),
|
||||||
|
prefs.getBoolean(
|
||||||
|
KEY_DEBUG_EXPERIMENTAL_AOD_STATUSBAR_ROOT,
|
||||||
|
SbtDefaults.DEBUG_EXPERIMENTAL_AOD_STATUSBAR_ROOT_DEFAULT)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1780,7 +1789,10 @@ public final class SbtSettings {
|
|||||||
SbtDefaults.DEBUG_VISUALIZE_CAMERA_CUTOUT_DEFAULT),
|
SbtDefaults.DEBUG_VISUALIZE_CAMERA_CUTOUT_DEFAULT),
|
||||||
bundle.getBoolean(
|
bundle.getBoolean(
|
||||||
KEY_DEBUG_VISUALIZE_AOD_STOCK_CONTAINERS,
|
KEY_DEBUG_VISUALIZE_AOD_STOCK_CONTAINERS,
|
||||||
SbtDefaults.DEBUG_VISUALIZE_AOD_STOCK_CONTAINERS_DEFAULT)
|
SbtDefaults.DEBUG_VISUALIZE_AOD_STOCK_CONTAINERS_DEFAULT),
|
||||||
|
bundle.getBoolean(
|
||||||
|
KEY_DEBUG_EXPERIMENTAL_AOD_STATUSBAR_ROOT,
|
||||||
|
SbtDefaults.DEBUG_EXPERIMENTAL_AOD_STATUSBAR_ROOT_DEFAULT)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -195,6 +195,9 @@ public class SbtSettingsProvider extends ContentProvider {
|
|||||||
out.putBoolean(SbtSettings.KEY_DEBUG_VISUALIZE_AOD_STOCK_CONTAINERS,
|
out.putBoolean(SbtSettings.KEY_DEBUG_VISUALIZE_AOD_STOCK_CONTAINERS,
|
||||||
prefs.getBoolean(SbtSettings.KEY_DEBUG_VISUALIZE_AOD_STOCK_CONTAINERS,
|
prefs.getBoolean(SbtSettings.KEY_DEBUG_VISUALIZE_AOD_STOCK_CONTAINERS,
|
||||||
SbtDefaults.DEBUG_VISUALIZE_AOD_STOCK_CONTAINERS_DEFAULT));
|
SbtDefaults.DEBUG_VISUALIZE_AOD_STOCK_CONTAINERS_DEFAULT));
|
||||||
|
out.putBoolean(SbtSettings.KEY_DEBUG_EXPERIMENTAL_AOD_STATUSBAR_ROOT,
|
||||||
|
prefs.getBoolean(SbtSettings.KEY_DEBUG_EXPERIMENTAL_AOD_STATUSBAR_ROOT,
|
||||||
|
SbtDefaults.DEBUG_EXPERIMENTAL_AOD_STATUSBAR_ROOT_DEFAULT));
|
||||||
out.putInt(SbtSettings.KEY_LAYOUT_PADDING_CUTOUT_PX,
|
out.putInt(SbtSettings.KEY_LAYOUT_PADDING_CUTOUT_PX,
|
||||||
prefs.getInt(SbtSettings.KEY_LAYOUT_PADDING_CUTOUT_PX,
|
prefs.getInt(SbtSettings.KEY_LAYOUT_PADDING_CUTOUT_PX,
|
||||||
SbtDefaults.LAYOUT_PADDING_CUTOUT_PX_DEFAULT));
|
SbtDefaults.LAYOUT_PADDING_CUTOUT_PX_DEFAULT));
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import android.Manifest;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
@@ -64,6 +65,8 @@ public class IconsDebugFragment extends Fragment {
|
|||||||
SwitchMaterial visualizeAodStockContainersSwitch =
|
SwitchMaterial visualizeAodStockContainersSwitch =
|
||||||
root.findViewById(R.id.debug_visualize_aod_stock_containers_switch);
|
root.findViewById(R.id.debug_visualize_aod_stock_containers_switch);
|
||||||
MaterialButton restartSystemUiButton = root.findViewById(R.id.debug_restart_systemui_button);
|
MaterialButton restartSystemUiButton = root.findViewById(R.id.debug_restart_systemui_button);
|
||||||
|
SwitchMaterial experimentalAodStatusbarRootSwitch =
|
||||||
|
root.findViewById(R.id.debug_experimental_aod_statusbar_root_switch);
|
||||||
SwitchMaterial cycleIconsSwitch = root.findViewById(R.id.debug_cycle_icons_switch);
|
SwitchMaterial cycleIconsSwitch = root.findViewById(R.id.debug_cycle_icons_switch);
|
||||||
TextView currentCameraIdentified = root.findViewById(R.id.debug_camera_current_identified);
|
TextView currentCameraIdentified = root.findViewById(R.id.debug_camera_current_identified);
|
||||||
LinearLayout currentCameraOverrideRow = root.findViewById(R.id.debug_camera_current_override_row);
|
LinearLayout currentCameraOverrideRow = root.findViewById(R.id.debug_camera_current_override_row);
|
||||||
@@ -137,6 +140,17 @@ public class IconsDebugFragment extends Fragment {
|
|||||||
SbtSettings.KEY_DEBUG_VISUALIZE_AOD_STOCK_CONTAINERS,
|
SbtSettings.KEY_DEBUG_VISUALIZE_AOD_STOCK_CONTAINERS,
|
||||||
SbtDefaults.DEBUG_VISUALIZE_AOD_STOCK_CONTAINERS_DEFAULT,
|
SbtDefaults.DEBUG_VISUALIZE_AOD_STOCK_CONTAINERS_DEFAULT,
|
||||||
true);
|
true);
|
||||||
|
ViewTreeSupport.bindBooleanPreference(
|
||||||
|
requireContext(),
|
||||||
|
prefs,
|
||||||
|
experimentalAodStatusbarRootSwitch,
|
||||||
|
SbtSettings.KEY_DEBUG_EXPERIMENTAL_AOD_STATUSBAR_ROOT,
|
||||||
|
SbtDefaults.DEBUG_EXPERIMENTAL_AOD_STATUSBAR_ROOT_DEFAULT,
|
||||||
|
true);
|
||||||
|
if (isSamsungDevice() && experimentalAodStatusbarRootSwitch != null) {
|
||||||
|
experimentalAodStatusbarRootSwitch.setChecked(false);
|
||||||
|
experimentalAodStatusbarRootSwitch.setEnabled(false);
|
||||||
|
}
|
||||||
bindRestartSystemUiButton(restartSystemUiButton);
|
bindRestartSystemUiButton(restartSystemUiButton);
|
||||||
updateVisualizerSwitchAvailability(
|
updateVisualizerSwitchAvailability(
|
||||||
prefs,
|
prefs,
|
||||||
@@ -187,6 +201,10 @@ public class IconsDebugFragment extends Fragment {
|
|||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isSamsungDevice() {
|
||||||
|
return "samsung".equalsIgnoreCase(Build.MANUFACTURER);
|
||||||
|
}
|
||||||
|
|
||||||
private void styleCompactCounterButton(MaterialButton button) {
|
private void styleCompactCounterButton(MaterialButton button) {
|
||||||
ViewTreeSupport.styleCompactButtonText(button, 13f);
|
ViewTreeSupport.styleCompactButtonText(button, 13f);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,6 +111,13 @@
|
|||||||
android:layout_marginTop="12dp"
|
android:layout_marginTop="12dp"
|
||||||
android:text="@string/debug_restart_systemui" />
|
android:text="@string/debug_restart_systemui" />
|
||||||
|
|
||||||
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||||
|
android:id="@+id/debug_experimental_aod_statusbar_root_switch"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:text="@string/debug_experimental_aod_statusbar_root" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
<string name="debug_visualize_aod_stock_containers">AOD stock containers and derived statusbar</string>
|
<string name="debug_visualize_aod_stock_containers">AOD stock containers and derived statusbar</string>
|
||||||
<string name="debug_section_systemui">SystemUI</string>
|
<string name="debug_section_systemui">SystemUI</string>
|
||||||
<string name="debug_restart_systemui">Restart SystemUI</string>
|
<string name="debug_restart_systemui">Restart SystemUI</string>
|
||||||
|
<string name="debug_experimental_aod_statusbar_root">Experimental non-Samsung AOD statusbar layout</string>
|
||||||
<string name="debug_restart_systemui_started">SystemUI restart requested.</string>
|
<string name="debug_restart_systemui_started">SystemUI restart requested.</string>
|
||||||
<string name="debug_restart_systemui_failed">Could not restart SystemUI. Root shell failed.</string>
|
<string name="debug_restart_systemui_failed">Could not restart SystemUI. Root shell failed.</string>
|
||||||
<string name="debug_notification_style_cards">Cards</string>
|
<string name="debug_notification_style_cards">Cards</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user