diff --git a/README.md b/README.md
index 69966fd..4078f44 100644
--- a/README.md
+++ b/README.md
@@ -64,12 +64,13 @@ until the compatibility matrix says otherwise.
## Device Compatibility
-Some behavior cannot be fully verified on emulators. In particular, smooth
-transitions between AOD, lockscreen, unlocked mode, and fullscreen apps may need
-physical-device testing. Emulator testing can still verify whether hooks load,
-whether SystemUI stays stable, whether settings apply, whether excessive
-background work appears in logs, and whether the steady state looks the way it
-should.
+Some behavior cannot be fully verified on emulators. Emulator testing can still
+verify whether hooks load, whether SystemUI stays stable, whether settings apply,
+whether excessive 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
One UI 8 / Android 16 | AOSP API 34
Android 14 | AOSP API 35
Android 15 | AOSP API 36
Android 16 | Google APIs API 35
Android 15 | Google APIs API 36
Android 16 | LineageOS 22
Android 15 | LineageOS 23
Android 16 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
@@ -77,26 +78,26 @@ should.
| Settings app opens and writes settings | ✅ | 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 AOD statusbar layout | ✅ | Untested | Untested | ❌ OneUI AOD hooks only; AOSP emulator has no visible AOD/doze statusbar surface | 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 | ❌ OneUI lockscreen/AOD style only | Untested | Untested | Untested | Untested |
-| Hide notification icons by app | ✅ | Untested | Untested | ✅ | Untested | Untested | Untested | Untested |
-| Hide status icons | ✅ | Untested | Untested | ✅ | Untested | Untested | Untested | Untested |
-| Dual-SIM status icon handling | ✅ | Untested | Untested | Untested; emulator has no dual-SIM signal state | Untested | Untested | Untested | Untested |
-| Samsung status chips: media/navigation/call | ✅ | Untested | Untested | ❌ OneUI-only | Untested | Untested | Untested | Untested |
-| Samsung charging chip handling | ✅ | Untested | Untested | ❌ OneUI-only | Untested | Untested | Untested | Untested |
+| Custom AOD statusbar layout | ✅ | Untested | Untested | ⚠️ Experimental | Untested | Untested | Untested | Untested |
+| Notification icons mode | ✅ | Untested | Untested | ✅ AOD experimental | Untested | Untested | Untested | Untested |
+| Notification cards mode | ✅ | Untested | Untested | ❌ | Untested | Untested | Untested | Untested |
+| Notification dot mode and read-state behavior | ✅ | Untested | Untested | ❌ | Untested | Untested | Untested | Untested |
+| Hide notification icons by app | ✅ | Untested | Untested | ✅ AOD experimental | Untested | Untested | Untested | Untested |
+| Hide status icons | ✅ | Untested | Untested | ✅ AOD experimental | Untested | Untested | Untested | Untested |
+| Dual-SIM status icon handling | ✅ | Untested | Untested | ⚠️ Experimental | Untested | Untested | Untested | Untested |
+| Samsung status chips: media/navigation/call | ✅ | Untested | Untested | ❌ | Untested | Untested | Untested | Untested |
+| Samsung charging chip handling | ✅ | 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 drawer clock/date text | ✅ | 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: 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 |
-| 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 |
-| 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 |
Current emulator targets use rooted LSPosed snapshots in a local test lab. They
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 0426a4c..481ea2f 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
@@ -1434,7 +1434,7 @@ final class StockLayoutCanvasController {
}
hideLockscreenCardsNotificationHost(root);
if (activeScene.notificationDisplayStyle() == NotificationDisplayStyle.CARDS
- && isAodLayoutRoot(root)) {
+ && isAodLayoutRoot(root, activeScene)) {
renderAodCardsNotificationStripIfNeeded(root, settings, activeScene);
} else {
removeAodCardsNotificationHost(root);
@@ -2308,7 +2308,7 @@ final class StockLayoutCanvasController {
boolean unlockedScene = activeScene != null && activeScene.isUnlocked();
boolean aodScene = activeScene != null && activeScene.isAod();
boolean rootDirty = dirtyUnlockedLayoutRoots.remove(root);
- boolean aodLayoutRoot = aodScene && isAodLayoutRoot(root);
+ boolean aodLayoutRoot = aodScene && isAodLayoutRoot(root, activeScene);
boolean hasAodLayoutPlan = aodScene && unlockedIconRenderController.hasLayoutPlan(root);
boolean layoutRoot = aodScene ? aodLayoutRoot : statusBarRoot;
if (aodScene
@@ -4996,7 +4996,8 @@ final class StockLayoutCanvasController {
SceneKey activeScene
) {
if (!isStatusBarLayoutRoot(root, activeScene)
- && !(activeScene != null && activeScene.isAod() && isAodLayoutRoot(root))) {
+ && !(activeScene != null && activeScene.isAod()
+ && isAodLayoutRoot(root, activeScene))) {
return null;
}
if (activeScene != null
@@ -5100,7 +5101,25 @@ final class StockLayoutCanvasController {
}
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) {
diff --git a/app/src/main/java/se/ajpanton/statusbartweak/runtime/render/UnlockedIconSnapshotRenderController.java b/app/src/main/java/se/ajpanton/statusbartweak/runtime/render/UnlockedIconSnapshotRenderController.java
index a208166..96dafdf 100644
--- a/app/src/main/java/se/ajpanton/statusbartweak/runtime/render/UnlockedIconSnapshotRenderController.java
+++ b/app/src/main/java/se/ajpanton/statusbartweak/runtime/render/UnlockedIconSnapshotRenderController.java
@@ -2,6 +2,7 @@ package se.ajpanton.statusbartweak.runtime.render;
import android.app.KeyguardManager;
import android.content.Context;
+import android.os.Build;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
@@ -464,7 +465,10 @@ public final class UnlockedIconSnapshotRenderController {
NotificationDisplayStyle style = scene.notificationDisplayStyle();
return settings.layoutNotifEnabledAod
&& (style == NotificationDisplayStyle.ICONS
- || style == NotificationDisplayStyle.DOT);
+ || style == NotificationDisplayStyle.DOT
+ || (style == NotificationDisplayStyle.UNKNOWN
+ && settings.debugExperimentalAodStatusbarRoot
+ && !"samsung".equalsIgnoreCase(Build.MANUFACTURER)));
}
return settings.layoutNotifEnabledUnlocked;
}
diff --git a/app/src/main/java/se/ajpanton/statusbartweak/runtime/render/UnlockedLayoutPlanner.java b/app/src/main/java/se/ajpanton/statusbartweak/runtime/render/UnlockedLayoutPlanner.java
index 28e059d..805b3a5 100644
--- a/app/src/main/java/se/ajpanton/statusbartweak/runtime/render/UnlockedLayoutPlanner.java
+++ b/app/src/main/java/se/ajpanton/statusbartweak/runtime/render/UnlockedLayoutPlanner.java
@@ -1,6 +1,7 @@
package se.ajpanton.statusbartweak.runtime.render;
import android.graphics.Rect;
+import android.os.Build;
import android.view.View;
import android.view.ViewGroup;
@@ -856,7 +857,9 @@ final class UnlockedLayoutPlanner {
if (style == NotificationDisplayStyle.DOT) {
return settings.layoutNotifEnabledAod ? 1 : 0;
}
- if (style != NotificationDisplayStyle.ICONS) {
+ if (style != NotificationDisplayStyle.ICONS
+ && !(style == NotificationDisplayStyle.UNKNOWN
+ && isExperimentalGenericAod(settings))) {
return 0;
}
return settings.layoutNotifEnabledAod ? settings.layoutNotifAodCount : 0;
@@ -870,6 +873,12 @@ final class UnlockedLayoutPlanner {
&& scene.notificationDisplayStyle() == NotificationDisplayStyle.DOT;
}
+ private boolean isExperimentalGenericAod(SbtSettings settings) {
+ return settings != null
+ && settings.debugExperimentalAodStatusbarRoot
+ && !"samsung".equalsIgnoreCase(Build.MANUFACTURER);
+ }
+
private ArrayList unreadNotificationPlacements(
ArrayList placements
) {
diff --git a/app/src/main/java/se/ajpanton/statusbartweak/runtime/render/UnlockedStockSourceCollector.java b/app/src/main/java/se/ajpanton/statusbartweak/runtime/render/UnlockedStockSourceCollector.java
index 7c52ec7..aa7f973 100644
--- a/app/src/main/java/se/ajpanton/statusbartweak/runtime/render/UnlockedStockSourceCollector.java
+++ b/app/src/main/java/se/ajpanton/statusbartweak/runtime/render/UnlockedStockSourceCollector.java
@@ -4,6 +4,7 @@ import android.content.Context;
import android.content.Intent;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
+import android.os.Build;
import android.os.BatteryManager;
import android.view.View;
import android.view.ViewGroup;
@@ -63,7 +64,7 @@ final class UnlockedStockSourceCollector {
ArrayList statusChips = new ArrayList<>();
ArrayList statusChipMetrics = new ArrayList<>();
if (scene != null && scene.isAod()) {
- collectAodStatusSnapshotViews(root, statusIcons, scene);
+ collectAodStatusSnapshotViews(root, statusIcons, scene, settings);
}
if (statusIcons.isEmpty()) {
if (anchors.statusRoot != null) {
@@ -82,8 +83,7 @@ final class UnlockedStockSourceCollector {
selectDualSimStatusSignals(statusIcons, settings);
normalizeStatusIconSourceBounds(root, statusIcons);
if (scene != null && scene.isAod()) {
- if (scene.notificationDisplayStyle() == NotificationDisplayStyle.ICONS
- || scene.notificationDisplayStyle() == NotificationDisplayStyle.DOT) {
+ if (isAodIconNotificationStyle(scene, settings)) {
notificationIcons.addAll(
LockscreenCardsNotificationIconSourceStore.snapshotSourcesForAodIconsRoot(root));
if (notificationIcons.isEmpty()
@@ -92,6 +92,12 @@ final class UnlockedStockSourceCollector {
LockscreenCardsNotificationIconSourceStore
.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) {
collectNotificationSnapshotViews(anchors.notificationRoot, notificationIcons);
@@ -111,14 +117,14 @@ final class UnlockedStockSourceCollector {
private void collectAodStatusSnapshotViews(
View root,
ArrayList out,
- SceneKey scene
+ SceneKey scene,
+ SbtSettings settings
) {
if (root == null || out == null) {
return;
}
boolean iconMode = scene != null
- && (scene.notificationDisplayStyle() == NotificationDisplayStyle.ICONS
- || scene.notificationDisplayStyle() == NotificationDisplayStyle.DOT);
+ && isAodIconNotificationStyle(scene, settings);
View excludedNotificationContainer = iconMode
? LockscreenCardsNotificationIconSourceStore.sourceContainerForAodIconsRoot(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) {
Object methodValue = ReflectionSupport.invokeMethod(view, methodName);
if (methodValue != null) {
@@ -193,7 +215,7 @@ final class UnlockedStockSourceCollector {
statusSourceSignature = 31 * statusSourceSignature + batteryChargingSignature(root);
if (scene != null && scene.isAod()) {
statusSourceSignature = 31 * statusSourceSignature
- + aodLayoutAnchorSignature(root, anchors, scene);
+ + aodLayoutAnchorSignature(root, anchors, scene, settings);
}
int notificationSourceSignature = sourceLayoutListSignature(
previousIcons != null ? previousIcons.notificationIcons : null);
@@ -238,13 +260,17 @@ final class UnlockedStockSourceCollector {
chipSourceSignature);
}
- private int aodLayoutAnchorSignature(View root, RootAnchors anchors, SceneKey scene) {
+ private int aodLayoutAnchorSignature(
+ View root,
+ RootAnchors anchors,
+ SceneKey scene,
+ SbtSettings settings
+ ) {
if (root == null) {
return 0;
}
boolean iconMode = scene != null
- && (scene.notificationDisplayStyle() == NotificationDisplayStyle.ICONS
- || scene.notificationDisplayStyle() == NotificationDisplayStyle.DOT);
+ && isAodIconNotificationStyle(scene, settings);
View notificationContainer = iconMode
? LockscreenCardsNotificationIconSourceStore.sourceContainerForAodIconsRoot(root)
: LockscreenCardsNotificationIconSourceStore.sourceContainerForRoot(root);
diff --git a/app/src/main/java/se/ajpanton/statusbartweak/shell/settings/SbtDefaults.java b/app/src/main/java/se/ajpanton/statusbartweak/shell/settings/SbtDefaults.java
index 809f372..a06e599 100644
--- a/app/src/main/java/se/ajpanton/statusbartweak/shell/settings/SbtDefaults.java
+++ b/app/src/main/java/se/ajpanton/statusbartweak/shell/settings/SbtDefaults.java
@@ -99,6 +99,7 @@ public final class SbtDefaults {
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_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_LEFT_PX_DEFAULT = 0;
diff --git a/app/src/main/java/se/ajpanton/statusbartweak/shell/settings/SbtSettings.java b/app/src/main/java/se/ajpanton/statusbartweak/shell/settings/SbtSettings.java
index a190bcd..ee1934d 100644
--- a/app/src/main/java/se/ajpanton/statusbartweak/shell/settings/SbtSettings.java
+++ b/app/src/main/java/se/ajpanton/statusbartweak/shell/settings/SbtSettings.java
@@ -39,6 +39,8 @@ public final class SbtSettings {
"debug_visualize_camera_cutout";
public static final String KEY_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 =
"locked_notification_mode";
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 debugVisualizeCameraCutout;
public final boolean debugVisualizeAodStockContainers;
+ public final boolean debugExperimentalAodStatusbarRoot;
private SbtSettings(boolean enableAodCutoutLimit,
boolean enableLockCutoutLimit,
@@ -558,7 +561,8 @@ public final class SbtSettings {
boolean debugVisualizeClockContainer,
boolean debugVisualizeChipContainer,
boolean debugVisualizeCameraCutout,
- boolean debugVisualizeAodStockContainers) {
+ boolean debugVisualizeAodStockContainers,
+ boolean debugExperimentalAodStatusbarRoot) {
this.enableAodCutoutLimit = enableAodCutoutLimit;
this.enableLockCutoutLimit = enableLockCutoutLimit;
this.unlockedMaxIconsPerRow = unlockedMaxIconsPerRow;
@@ -861,6 +865,7 @@ public final class SbtSettings {
this.debugVisualizeChipContainer = debugVisualizeChipContainer;
this.debugVisualizeCameraCutout = debugVisualizeCameraCutout;
this.debugVisualizeAodStockContainers = debugVisualizeAodStockContainers;
+ this.debugExperimentalAodStatusbarRoot = debugExperimentalAodStatusbarRoot;
}
public static SbtSettings defaults() {
@@ -997,7 +1002,8 @@ public final class SbtSettings {
SbtDefaults.DEBUG_VISUALIZE_CLOCK_CONTAINER_DEFAULT,
SbtDefaults.DEBUG_VISUALIZE_CHIP_CONTAINER_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),
prefs.getBoolean(
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),
bundle.getBoolean(
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)
);
}
diff --git a/app/src/main/java/se/ajpanton/statusbartweak/shell/settings/SbtSettingsProvider.java b/app/src/main/java/se/ajpanton/statusbartweak/shell/settings/SbtSettingsProvider.java
index 5c01707..b59f870 100644
--- a/app/src/main/java/se/ajpanton/statusbartweak/shell/settings/SbtSettingsProvider.java
+++ b/app/src/main/java/se/ajpanton/statusbartweak/shell/settings/SbtSettingsProvider.java
@@ -195,6 +195,9 @@ public class SbtSettingsProvider extends ContentProvider {
out.putBoolean(SbtSettings.KEY_DEBUG_VISUALIZE_AOD_STOCK_CONTAINERS,
prefs.getBoolean(SbtSettings.KEY_DEBUG_VISUALIZE_AOD_STOCK_CONTAINERS,
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,
prefs.getInt(SbtSettings.KEY_LAYOUT_PADDING_CUTOUT_PX,
SbtDefaults.LAYOUT_PADDING_CUTOUT_PX_DEFAULT));
diff --git a/app/src/main/java/se/ajpanton/statusbartweak/shell/ui/IconsDebugFragment.java b/app/src/main/java/se/ajpanton/statusbartweak/shell/ui/IconsDebugFragment.java
index b55d33d..5b93de1 100644
--- a/app/src/main/java/se/ajpanton/statusbartweak/shell/ui/IconsDebugFragment.java
+++ b/app/src/main/java/se/ajpanton/statusbartweak/shell/ui/IconsDebugFragment.java
@@ -4,6 +4,7 @@ import android.Manifest;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
+import android.os.Build;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
@@ -64,6 +65,8 @@ public class IconsDebugFragment extends Fragment {
SwitchMaterial visualizeAodStockContainersSwitch =
root.findViewById(R.id.debug_visualize_aod_stock_containers_switch);
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);
TextView currentCameraIdentified = root.findViewById(R.id.debug_camera_current_identified);
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,
SbtDefaults.DEBUG_VISUALIZE_AOD_STOCK_CONTAINERS_DEFAULT,
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);
updateVisualizerSwitchAvailability(
prefs,
@@ -187,6 +201,10 @@ public class IconsDebugFragment extends Fragment {
return root;
}
+ private boolean isSamsungDevice() {
+ return "samsung".equalsIgnoreCase(Build.MANUFACTURER);
+ }
+
private void styleCompactCounterButton(MaterialButton button) {
ViewTreeSupport.styleCompactButtonText(button, 13f);
}
diff --git a/app/src/main/res/layout/fragment_icons_debug.xml b/app/src/main/res/layout/fragment_icons_debug.xml
index 05d6a42..4fbf77b 100644
--- a/app/src/main/res/layout/fragment_icons_debug.xml
+++ b/app/src/main/res/layout/fragment_icons_debug.xml
@@ -111,6 +111,13 @@
android:layout_marginTop="12dp"
android:text="@string/debug_restart_systemui" />
+
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 33e82a4..724961f 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -30,6 +30,7 @@
AOD stock containers and derived statusbar
SystemUI
Restart SystemUI
+ Experimental non-Samsung AOD statusbar layout
SystemUI restart requested.
Could not restart SystemUI. Root shell failed.
Cards