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
This commit is contained in:
Dianne Hackborn
2014-07-22 16:22:37 -07:00
parent 368c5adaf7
commit 4eee3cb1df

View File

@@ -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(),