summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdnan Begovic <adnan@cyngn.com>2016-05-20 13:06:35 -0700
committerAdnan Begovic <adnan@cyngn.com>2016-05-23 12:28:45 -0700
commit240f1df9a0647cc95e11d5ec3fd524155d3dd21a (patch)
treec90516f58619835cd8c0658359afac62a835e659
parent442102ab9239ca9dd1ac17c4bb706ddef83e7ec1 (diff)
downloadandroid_packages_apps_Snap-240f1df9a0647cc95e11d5ec3fd524155d3dd21a.zip
android_packages_apps_Snap-240f1df9a0647cc95e11d5ec3fd524155d3dd21a.tar.gz
android_packages_apps_Snap-240f1df9a0647cc95e11d5ec3fd524155d3dd21a.tar.bz2
Snap: Use new window manager flag for prevent system keys.
Change-Id: I94ed12ddd33729a4fb486f7fb68f1bbab788b239 TICKET: FEIJ-522 (cherry picked from commit 94574eb97d43e17d0f2a115370f0f767f4c6049c)
-rw-r--r--AndroidManifest.xml2
-rw-r--r--src/com/android/camera/CameraActivity.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index d32caeb..3b08645 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -36,7 +36,7 @@
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
- <uses-permission android:name="android.permission.PREVENT_POWER_KEY" />
+ <uses-permission android:name="android.permission.PREVENT_SYSTEM_KEYS" />
<supports-screens
android:anyDensity="true"
diff --git a/src/com/android/camera/CameraActivity.java b/src/com/android/camera/CameraActivity.java
index ba79b1c..0f36052 100644
--- a/src/com/android/camera/CameraActivity.java
+++ b/src/com/android/camera/CameraActivity.java
@@ -1809,10 +1809,10 @@ public class CameraActivity extends Activity
}
if (mPowerShutter && mInCameraApp) {
getWindow().addPrivateFlags(
- WindowManager.LayoutParams.PRIVATE_FLAG_PREVENT_POWER_KEY);
+ WindowManager.LayoutParams.PRIVATE_FLAG_PREVENT_SYSTEM_KEYS);
} else {
getWindow().clearPrivateFlags(
- WindowManager.LayoutParams.PRIVATE_FLAG_PREVENT_POWER_KEY);
+ WindowManager.LayoutParams.PRIVATE_FLAG_PREVENT_SYSTEM_KEYS);
}
}