summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCY Cheng <cycheng@google.com>2018-08-06 13:43:09 +0800
committerCY Cheng <cycheng@google.com>2018-08-22 14:16:15 +0000
commitff3f7011071b3e77cf3c64949e349c200147711c (patch)
tree3234002445ee696535af075dd14a665aeea239fd
parent1f4d5189c8a4020c95bbf641c1cb27195437756c (diff)
downloadEmergencyInfo-ff3f7011071b3e77cf3c64949e349c200147711c.tar.gz
Replace deprecated attr and flag for running over lockscreen.
The deprecated window flag FLAG_SHOW_WHEN_LOCKED is replaced with R.attr.showWhenLocked. Also remove the deprecated attr showOnLockScreen, which had two purposes: 1. specify activity should be shown over the lock screen, and 2. shown across multiple user's window. Each user should has their own emergency information, so the suggested replacement for showOnLockScreen: showForAllUsers won't be added here. Fixes: 110818163 Fixes: 113004414 Test: manually Change-Id: I481ffdeec293fc08cca0f99063efc73540d6a14d
-rw-r--r--AndroidManifest.xml2
-rw-r--r--src/com/android/emergency/view/ViewInfoActivity.java1
2 files changed, 1 insertions, 2 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index a589a20f..626eb734 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -34,7 +34,7 @@
android:name=".view.ViewInfoActivity"
android:theme="@style/AppThemeEmergency"
android:taskAffinity="com.android.settings"
- android:showOnLockScreen="true"
+ android:showWhenLocked="true"
android:icon="@drawable/ic_launcher_settings"
android:launchMode="singleTask">
<intent-filter>
diff --git a/src/com/android/emergency/view/ViewInfoActivity.java b/src/com/android/emergency/view/ViewInfoActivity.java
index ee3435a0..cc0b62a8 100644
--- a/src/com/android/emergency/view/ViewInfoActivity.java
+++ b/src/com/android/emergency/view/ViewInfoActivity.java
@@ -74,7 +74,6 @@ public class ViewInfoActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
- getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
super.onCreate(savedInstanceState);
setContentView(R.layout.view_activity_layout);
mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);