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:49 -0700
commita5d7ca295ba4849ed72dbe8215cc7a3b35a18006 (patch)
tree111790b377183929e0ce82dae60a36a512084d09
parent1833d00d9fd45424692244a6b4bd164c72c020ab (diff)
downloadandroid_packages_apps_Snap-a5d7ca295ba4849ed72dbe8215cc7a3b35a18006.zip
android_packages_apps_Snap-a5d7ca295ba4849ed72dbe8215cc7a3b35a18006.tar.gz
android_packages_apps_Snap-a5d7ca295ba4849ed72dbe8215cc7a3b35a18006.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 e6e1ea4..05ba232 100644
--- a/src/com/android/camera/CameraActivity.java
+++ b/src/com/android/camera/CameraActivity.java
@@ -1795,10 +1795,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);
}
}