summaryrefslogtreecommitdiffstats
path: root/AndroidManifest.xml
diff options
context:
space:
mode:
authorjunjiez <junjiez@codeaurora.org>2016-08-05 10:59:39 +0800
committerjunjiez <junjiez@codeaurora.org>2016-08-08 09:33:49 +0800
commit9a4e6d0253792dea4e52cd180f3fd74cc9d65ab3 (patch)
tree9e59407a1080bd8702e7281c7d4f660d5684ad07 /AndroidManifest.xml
parent9f65ee95c61d70d6f7c34cd8bedea61ff1cdf2d1 (diff)
downloadandroid_packages_apps_Snap-9a4e6d0253792dea4e52cd180f3fd74cc9d65ab3.tar.gz
android_packages_apps_Snap-9a4e6d0253792dea4e52cd180f3fd74cc9d65ab3.tar.bz2
android_packages_apps_Snap-9a4e6d0253792dea4e52cd180f3fd74cc9d65ab3.zip
SnapdragonCamera: fix invoke camera failture caused by permissions
When the other apps want to invoke camera by intent, if the permission needed by camera is not granted, camera will restart and the intent will be lost, so check the permission first before invoke camera with intents Change-Id: I2c403d2cd78453cc8afcda374969dac87a6becf6 CRs-Fixed: 1047924
Diffstat (limited to 'AndroidManifest.xml')
-rw-r--r--AndroidManifest.xml34
1 files changed, 21 insertions, 13 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 53ebaa39d..13311edae 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -54,18 +54,6 @@
android:taskAffinity="com.android.camera.CameraActivity"
android:theme="@style/Theme.Camera"
android:windowSoftInputMode="stateAlwaysHidden|adjustPan" >
- <intent-filter>
- <action android:name="android.media.action.IMAGE_CAPTURE" />
- <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
- <intent-filter>
- <action android:name="android.media.action.STILL_IMAGE_CAMERA" />
- <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.DEFAULT" />
- </intent-filter>
<meta-data
android:name="com.android.keyguard.layout"
@@ -95,13 +83,33 @@
</intent-filter>
</activity-alias>
+ <activity-alias
+ android:name="com.android.camera.PhotoCamera"
+ android:icon="@mipmap/ic_launcher_camera"
+ android:label="@string/snapcam_app_name"
+ android:launchMode="singleTop"
+ android:targetActivity="com.android.camera.PermissionsActivity">
+ <intent-filter>
+ <action android:name="android.media.action.IMAGE_CAPTURE" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ <intent-filter>
+ <action android:name="android.media.action.STILL_IMAGE_CAMERA" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ </activity-alias>
+
<!-- Video camera and capture use the Camcorder label and icon. -->
<activity-alias
android:name="com.android.camera.VideoCamera"
android:icon="@mipmap/ic_launcher_video_camera"
android:label="@string/video_camera_label"
android:launchMode="singleTop"
- android:targetActivity="com.android.camera.CameraActivity">
+ android:targetActivity="com.android.camera.PermissionsActivity">
<intent-filter>
<action android:name="android.media.action.VIDEO_CAMERA" />
<category android:name="android.intent.category.DEFAULT" />