Merge "[Security] resolve overlay attack on RequestIgnoreBatteryOptimizations" into sc-v2-dev
This commit is contained in:
@@ -42,6 +42,8 @@ public class RequestIgnoreBatteryOptimizations extends AlertActivity implements
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
getWindow().addSystemFlags(android.view.WindowManager.LayoutParams
|
||||
.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
|
||||
|
||||
mPowerWhitelistManager = getSystemService(PowerWhitelistManager.class);
|
||||
|
||||
@@ -98,13 +100,6 @@ public class RequestIgnoreBatteryOptimizations extends AlertActivity implements
|
||||
setupAlert();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
getWindow().addSystemFlags(android.view.WindowManager.LayoutParams
|
||||
.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
switch (which) {
|
||||
|
Reference in New Issue
Block a user