summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuK1337 <priv.luk@gmail.com>2019-11-11 12:48:51 +0100
committerLuK1337 <priv.luk@gmail.com>2019-11-11 12:50:59 +0100
commit8b25286e72f10369accb46e12ae454533c13df38 (patch)
treefdbaf0af4134af141a6a032164cebff2119424d5
parentfd3f92a5bcd5f9b48abf2d6bd8c19afb3e5c1e12 (diff)
downloadandroid_packages_apps_Snap-8b25286e72f10369accb46e12ae454533c13df38.zip
android_packages_apps_Snap-8b25286e72f10369accb46e12ae454533c13df38.tar.gz
android_packages_apps_Snap-8b25286e72f10369accb46e12ae454533c13df38.tar.bz2
Snap: Don't query camera hardware on camera button action
* Android 10 does not allow idle apps to do anything camera related so lets just launch the app unconditionally instead. Change-Id: I117b1442e5ca107205d4b69cbfd32d5375995d78
-rw-r--r--src/com/android/camera/CameraButtonIntentReceiver.java11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/com/android/camera/CameraButtonIntentReceiver.java b/src/com/android/camera/CameraButtonIntentReceiver.java
index 253105a..3d59fd3 100644
--- a/src/com/android/camera/CameraButtonIntentReceiver.java
+++ b/src/com/android/camera/CameraButtonIntentReceiver.java
@@ -34,17 +34,6 @@ public class CameraButtonIntentReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
- // Try to get the camera hardware
- CameraHolder holder = CameraHolder.instance();
- ComboPreferences pref = new ComboPreferences(context);
- int cameraId = CameraSettings.readPreferredCameraId(pref);
- if (holder.tryOpen(null, cameraId, null) == null) {
- return;
- }
-
- // We are going to launch the camera, so hold the camera for later use
- holder.keep();
- holder.release();
Intent i = new Intent(Intent.ACTION_MAIN);
i.setClass(context, CameraActivity.class);
i.addCategory(Intent.CATEGORY_LAUNCHER);