Hide non-system overlay window on AllowBindAppWidgetActivity
Bug: 184676316 Test: manual test using BindAppWidget-Overlay-poc.apk Change-Id: I234b5ac26c8f4fd80462b7e9c311d8feca05845f
This commit is contained in:
@@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
package com.android.settings;
|
package com.android.settings;
|
||||||
|
|
||||||
|
import static android.view.WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS;
|
||||||
|
|
||||||
import android.appwidget.AppWidgetManager;
|
import android.appwidget.AppWidgetManager;
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@@ -91,6 +93,7 @@ public class AllowBindAppWidgetActivity extends AlertActivity implements
|
|||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
getWindow().addPrivateFlags(SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
|
||||||
setResult(RESULT_CANCELED); // By default, set the result to cancelled
|
setResult(RESULT_CANCELED); // By default, set the result to cancelled
|
||||||
Intent intent = getIntent();
|
Intent intent = getIntent();
|
||||||
CharSequence label = "";
|
CharSequence label = "";
|
||||||
|
Reference in New Issue
Block a user