Hide non-system overlay window on ActivityPicker
To improve security. Bug: 181962311 Test: manual Show an AlertDialog and observe if it will hide after below command. adb shell am start -a android.intent.action.PICK_ACTIVITY -n com.android.settings/.ActivityPicker Change-Id: I6e2845cc19dc012cba2933318a067bbb8db90a23 (cherry picked from commit3b4853e109
) (cherry picked from commitaef628646a
)
This commit is contained in:
committed by
android-build-team Robot
parent
e5bbccb2ee
commit
ceb2e28da4
@@ -16,6 +16,8 @@
|
||||
|
||||
package com.android.settings;
|
||||
|
||||
import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
@@ -72,6 +74,8 @@ public class ActivityPicker extends AlertActivity implements
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
getWindow().addPrivateFlags(SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
|
||||
|
||||
final Intent intent = getIntent();
|
||||
|
||||
// Read base intent from extras, otherwise assume default
|
||||
|
Reference in New Issue
Block a user