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

Commit 4eee3cb1 authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Finish toast app op.

It was half-done, the window manager would check it
when the window was added, but was not monitoring for changes
to its state like it does for the system alert op.

Change-Id: I0279c4ac6160062cd219372af4bd9d7e4e687460
parent 368c5ada
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -803,14 +803,14 @@ public class WindowManagerService extends IWindowManager.Stub
        mActivityManager = ActivityManagerNative.getDefault();
        mBatteryStats = BatteryStatsService.getService();
        mAppOps = (AppOpsManager)context.getSystemService(Context.APP_OPS_SERVICE);
        mAppOps.startWatchingMode(AppOpsManager.OP_SYSTEM_ALERT_WINDOW, null,
        AppOpsManager.OnOpChangedInternalListener opListener =
                new AppOpsManager.OnOpChangedInternalListener() {
                    @Override
                    public void onOpChanged(int op, String packageName) {
                    @Override public void onOpChanged(int op, String packageName) {
                        updateAppOpsState();
                    }
                }
        );
                };
        mAppOps.startWatchingMode(AppOpsManager.OP_SYSTEM_ALERT_WINDOW, null, opListener);
        mAppOps.startWatchingMode(AppOpsManager.OP_TOAST_WINDOW, null, opListener);

        // Get persisted window scale setting
        mWindowAnimationScaleSetting = Settings.Global.getFloat(context.getContentResolver(),