summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorarunvoddu <arunvoddu@google.com>2022-09-27 17:28:57 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-09-27 17:28:57 +0000
commitef202fffb46d23bf2a8b22e76c33e1fa7c142348 (patch)
tree3cd296b1ec754e088337cdda04da268ef10667bf /src
parent809450af0d0711520220b6db3dc6067dfcc3da1b (diff)
parentaa8d8c37e1949286191649d9e9d97e750a948cf9 (diff)
downloadStk-ef202fffb46d23bf2a8b22e76c33e1fa7c142348.tar.gz
Prevent draw overlay on top of SimToolKit dialog am: aa8d8c37e1
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Stk/+/20011152 Change-Id: I84751f85d22e87bb541f9eb3587e0651686226d5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'src')
-rw-r--r--src/com/android/stk/StkInputActivity.java5
-rw-r--r--src/com/android/stk/StkLauncherActivity.java4
-rw-r--r--src/com/android/stk/StkMain.java5
-rw-r--r--src/com/android/stk/StkMenuActivity.java4
4 files changed, 11 insertions, 7 deletions
diff --git a/src/com/android/stk/StkInputActivity.java b/src/com/android/stk/StkInputActivity.java
index 18e7b35..f606899 100644
--- a/src/com/android/stk/StkInputActivity.java
+++ b/src/com/android/stk/StkInputActivity.java
@@ -16,8 +16,6 @@
package com.android.stk;
-import android.app.ActionBar;
-import android.app.Activity;
import android.app.AlarmManager;
import android.content.Context;
import android.content.Intent;
@@ -150,7 +148,8 @@ public class StkInputActivity extends AppCompatActivity implements View.OnClickL
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
-
+ getWindow().addSystemFlags(
+ WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
CatLog.d(LOG_TAG, "onCreate - mIsResponseSent[" + mIsResponseSent + "]");
// appService can be null if this activity is automatically recreated by the system
diff --git a/src/com/android/stk/StkLauncherActivity.java b/src/com/android/stk/StkLauncherActivity.java
index 97b642c..907c6ee 100644
--- a/src/com/android/stk/StkLauncherActivity.java
+++ b/src/com/android/stk/StkLauncherActivity.java
@@ -23,6 +23,7 @@ import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.KeyEvent;
+import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
@@ -32,7 +33,6 @@ import android.graphics.BitmapFactory;
import com.android.internal.telephony.cat.Item;
import com.android.internal.telephony.cat.Menu;
import com.android.internal.telephony.cat.CatLog;
-import com.android.internal.telephony.PhoneConstants;
import android.telephony.TelephonyManager;
@@ -57,6 +57,8 @@ public class StkLauncherActivity extends ListActivity {
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
+ getWindow().addSystemFlags(
+ WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
CatLog.d(LOG_TAG, "onCreate+");
mContext = getBaseContext();
mTm = (TelephonyManager) mContext.getSystemService(
diff --git a/src/com/android/stk/StkMain.java b/src/com/android/stk/StkMain.java
index c9ff44a..2d3e467 100644
--- a/src/com/android/stk/StkMain.java
+++ b/src/com/android/stk/StkMain.java
@@ -20,14 +20,13 @@ import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
-import android.view.View;
import com.android.internal.telephony.cat.CatLog;
-import com.android.internal.telephony.PhoneConstants;
import android.telephony.TelephonyManager;
import android.view.Gravity;
+import android.view.WindowManager;
import android.widget.Toast;
/**
@@ -46,6 +45,8 @@ import android.widget.Toast;
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
+ getWindow().addSystemFlags(
+ WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
CatLog.d(LOG_TAG, "onCreate+");
mContext = getBaseContext();
mTm = (TelephonyManager) mContext.getSystemService(
diff --git a/src/com/android/stk/StkMenuActivity.java b/src/com/android/stk/StkMenuActivity.java
index f32c1bd..2033900 100644
--- a/src/com/android/stk/StkMenuActivity.java
+++ b/src/com/android/stk/StkMenuActivity.java
@@ -31,6 +31,7 @@ import android.view.ContextMenu.ContextMenuInfo;
import android.view.KeyEvent;
import android.view.MenuItem;
import android.view.View;
+import android.view.WindowManager;
import android.widget.AdapterView;
import android.widget.ImageView;
import android.widget.ListView;
@@ -84,7 +85,8 @@ public class StkMenuActivity extends ListActivity implements View.OnCreateContex
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
-
+ getWindow().addSystemFlags(
+ WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
CatLog.d(LOG_TAG, "onCreate");
ActionBar actionBar = getActionBar();