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
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
getWindow().addSystemFlags(android.view.WindowManager.LayoutParams
|
||||||
|
.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
|
||||||
|
|
||||||
mPowerWhitelistManager = getSystemService(PowerWhitelistManager.class);
|
mPowerWhitelistManager = getSystemService(PowerWhitelistManager.class);
|
||||||
|
|
||||||
@@ -98,13 +100,6 @@ public class RequestIgnoreBatteryOptimizations extends AlertActivity implements
|
|||||||
setupAlert();
|
setupAlert();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onStart() {
|
|
||||||
super.onStart();
|
|
||||||
getWindow().addSystemFlags(android.view.WindowManager.LayoutParams
|
|
||||||
.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
switch (which) {
|
switch (which) {
|
||||||
|
Reference in New Issue
Block a user