From 219fbf4d3d7c47039c79822af26bace2849375e4 Mon Sep 17 00:00:00 2001 From: zafir Date: Mon, 29 Jun 2015 00:08:22 -0500 Subject: Minimum viable Android M runtime permissions handling for H. Creates new activity for permissions handling: both checking for permissions and handling error condition when critical permissions are not present. The reason for creating a new activity is so the app does not attempt to continue executing OnCreate, OnResume etc, which opens the camera while the dialogs are showing. This should not slow the app down because the permissions activity will only run when a) the first time the app has insufficient permissions and b) when a critical permission is missing and the app needs to shut down. Bug: 21273463 CRs-Fixed: 1019847 Change-Id: I603acfb3057ba26b9cfa7935eb4cb24b5d547cb5 (cherry picked from commit ad44cda82fe6ec5ee090115129223c6314f9e1bb) Fixes to M permissions. Previously, we called PermissionsActivity with startActivityForResult(). However, this creates race conditions as we check for permissions and the CameraActivity continues to operate. Now, we end CameraActivity and launch a new instance upon successful permissions resolution. We can also put the preload filmstrip logic back in its original place in onCreate. The checks for permissions happen in both onCreate and onResume. Bug: 22442745, 22478144, 22497152 CRs-Fixed: 1019847 Change-Id: I82e9125a46581db44aa61d4ee94aec5a820e9df0 (cherry picked from commit ac0e2425e77a9b69e76d2f31876798825ea44584) SnapdragonCamera: Fixed M permission issue - Resolved NPE while sending permission request - Made change to request non-critical permissions once only, but the critical permssions all th time. - Removed unused contant defines CRs-Fixed: 1019847 Change-Id: Ib997244cbcc041d86c094c7ee7a902bff56e92ad snap: Remove platform signature * We are using runtime permissions now. Change-Id: I3386214dbbc0915251941ef490e7cbaf27e6ed45 --- Android.mk | 2 -- 1 file changed, 2 deletions(-) (limited to 'Android.mk') diff --git a/Android.mk b/Android.mk index 0b2bc5355..44b0b7ecf 100644 --- a/Android.mk +++ b/Android.mk @@ -15,8 +15,6 @@ LOCAL_SRC_FILES += $(call all-java-files-under, src_pd_gcam) LOCAL_RESOURCE_DIR += $(LOCAL_PATH)/res -LOCAL_CERTIFICATE := platform - include $(LOCAL_PATH)/version.mk LOCAL_AAPT_FLAGS := \ --auto-add-overlay \ -- cgit v1.2.3