DO NOT MERGE Do not update bar control target when application is starting
Handling the bar control target even when the application is starting causes there to be a flicker in system bar visibility when switching from one immersive mode app to another immersive mode app. Bug: 149312861 Test: manual Change-Id: If5de2ff97d4ad177e5fc58baa82b3f43ed118c2e
This commit is contained in:
@@ -27,6 +27,7 @@ import static android.view.InsetsState.ITYPE_STATUS_BAR;
|
|||||||
import static android.view.SyncRtSurfaceTransactionApplier.applyParams;
|
import static android.view.SyncRtSurfaceTransactionApplier.applyParams;
|
||||||
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_SHOW_STATUS_BAR;
|
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_SHOW_STATUS_BAR;
|
||||||
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION;
|
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION;
|
||||||
|
import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING;
|
||||||
|
|
||||||
import android.annotation.Nullable;
|
import android.annotation.Nullable;
|
||||||
import android.app.StatusBarManager;
|
import android.app.StatusBarManager;
|
||||||
@@ -127,6 +128,9 @@ class InsetsPolicy {
|
|||||||
|
|
||||||
/** Updates the target which can control system bars. */
|
/** Updates the target which can control system bars. */
|
||||||
void updateBarControlTarget(@Nullable WindowState focusedWin) {
|
void updateBarControlTarget(@Nullable WindowState focusedWin) {
|
||||||
|
if (focusedWin != null && (focusedWin.mAttrs.type == TYPE_APPLICATION_STARTING)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (mFocusedWin != focusedWin){
|
if (mFocusedWin != focusedWin){
|
||||||
abortTransient();
|
abortTransient();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user