Improve AOSP stock statusbar suppression
This commit is contained in:
+32
@@ -80,6 +80,7 @@ final class StockLayoutCanvasController {
|
|||||||
"entries"
|
"entries"
|
||||||
};
|
};
|
||||||
private static final Set<String> TARGET_ID_NAMES = Set.of(
|
private static final Set<String> TARGET_ID_NAMES = Set.of(
|
||||||
|
"clock",
|
||||||
"left_clock_container",
|
"left_clock_container",
|
||||||
"notification_icon_area",
|
"notification_icon_area",
|
||||||
"notification_icon_area_inner",
|
"notification_icon_area_inner",
|
||||||
@@ -99,6 +100,7 @@ final class StockLayoutCanvasController {
|
|||||||
);
|
);
|
||||||
|
|
||||||
private static final Set<String> LAYOUT_OFF_UNLOCKED_ONLY_IDS = Set.of(
|
private static final Set<String> LAYOUT_OFF_UNLOCKED_ONLY_IDS = Set.of(
|
||||||
|
"clock",
|
||||||
"left_clock_container",
|
"left_clock_container",
|
||||||
"notification_icon_area",
|
"notification_icon_area",
|
||||||
"notification_icon_area_inner",
|
"notification_icon_area_inner",
|
||||||
@@ -2424,6 +2426,7 @@ final class StockLayoutCanvasController {
|
|||||||
renderResult.layoutChanged(),
|
renderResult.layoutChanged(),
|
||||||
false,
|
false,
|
||||||
activeScene);
|
activeScene);
|
||||||
|
hideTrackedUnlockedStockSurfaces(root);
|
||||||
hideTrackedStatusChipSources(root);
|
hideTrackedStatusChipSources(root);
|
||||||
if (renderResult.chipSourcesChanged()
|
if (renderResult.chipSourcesChanged()
|
||||||
&& !scanTree
|
&& !scanTree
|
||||||
@@ -2453,6 +2456,35 @@ final class StockLayoutCanvasController {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void hideTrackedUnlockedStockSurfaces(View root) {
|
||||||
|
if (root == null || trackedUnlockedStockSurfaces.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ArrayDeque<View> staleViews = new ArrayDeque<>();
|
||||||
|
for (View view : trackedUnlockedStockSurfaces) {
|
||||||
|
if (view == null || !view.isAttachedToWindow()) {
|
||||||
|
staleViews.add(view);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!isDescendantOf(view, root)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (ownedIconHostManager.isOwnedHost(view)) {
|
||||||
|
staleViews.add(view);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (isTrackableStatusChipSurface(view)) {
|
||||||
|
hideStatusChipSurface(root, view);
|
||||||
|
} else if (shouldHideNonChipView(view)) {
|
||||||
|
hideView(view, true);
|
||||||
|
} else {
|
||||||
|
restoreView(view);
|
||||||
|
staleViews.add(view);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
removeStaleViews(trackedUnlockedStockSurfaces, staleViews);
|
||||||
|
}
|
||||||
|
|
||||||
private void applyLayoutOffRoot(
|
private void applyLayoutOffRoot(
|
||||||
View root,
|
View root,
|
||||||
SbtSettings settings,
|
SbtSettings settings,
|
||||||
|
|||||||
Reference in New Issue
Block a user