Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5813ff8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Move StatusBarService.disableForUser binder call to bg thread." into main

parents 8c37fec1 db7f6d18
Loading
Loading
Loading
Loading
+19 −14
Original line number Diff line number Diff line
@@ -3765,13 +3765,7 @@ public class KeyguardViewMediator implements CoreStartable,
                        Log.d(TAG, "Status bar manager is disabled for visible background users");
                    }
                } else {
                    try {
                        mStatusBarService.disableForUser(flags, mStatusBarDisableToken,
                                mContext.getPackageName(),
                                mSelectedUserInteractor.getSelectedUserId());
                    } catch (RemoteException e) {
                        Log.d(TAG, "Failed to force clear flags", e);
                    }
                    statusBarServiceDisableForUser(flags, "Failed to force clear flags");
                }
            }

@@ -3807,15 +3801,26 @@ public class KeyguardViewMediator implements CoreStartable,

                // Handled in StatusBarDisableFlagsInteractor.
                if (!KeyguardWmStateRefactor.isEnabled()) {
                    statusBarServiceDisableForUser(flags, "Failed to set disable flags: ");
                }
            }
        }
    }

    private void statusBarServiceDisableForUser(int flags, String loggingContext) {
        Runnable runnable = () -> {
            try {
                mStatusBarService.disableForUser(flags, mStatusBarDisableToken,
                        mContext.getPackageName(),
                        mSelectedUserInteractor.getSelectedUserId());
            } catch (RemoteException e) {
                        Log.d(TAG, "Failed to set disable flags: " + flags, e);
                    }
                }
                Log.d(TAG, loggingContext + " " + flags, e);
            }
        };
        if (com.android.systemui.Flags.bouncerUiRevamp()) {
            mUiBgExecutor.execute(runnable);
        } else {
            runnable.run();
        }
    }