c8594ddf504109dc3c17baf9c2448469b28973e9 |
|
31-Jul-2015 |
Alan Newberger <alann@google.com> |
Check for zero length array returns permissions API may return zero length arrays, check before access. Bug: 22871531 Change-Id: I0ebd5feecb24f03fda0350a9ab42efa25127b3dc
/packages/apps/Camera2/src/com/android/camera/PermissionsActivity.java
|
ac0e2425e77a9b69e76d2f31876798825ea44584 |
|
15-Jul-2015 |
zafir <zafir@google.com> |
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 Change-Id: I82e9125a46581db44aa61d4ee94aec5a820e9df0
/packages/apps/Camera2/src/com/android/camera/PermissionsActivity.java
|
dd334be92c5513a06c809ee3ea25e411dfad0589 |
|
15-Jul-2015 |
zafir <zafir@google.com> |
Camera M permissions: lockscreen improvements This CL now just provides some improvements for lockscreen independent of any onCreate/onResume lifecycle adjustments. Fixes include: * add a black content view to Permissions Activity -- noticed screen junk opening from lockscreen due to unpainted regions, the whole activity needs to paint the screen not just the dialog. * use FLAG_SHOW_WHEN_LOCKED to show permissions screen over lockscreen, per bug discussion in this case force failure, don't prompt for permission grants. * fun double onResumes induce flicker jank in the dialog UI. Inherit QuickActivity to automatically pick up the workarounds for double onResumes from lockscreens, no more flicker in the permission dialog. * also borrow from CameraActivity, broadcast receives to shut down the permissions dialog when screen goes off or user hits home on top of lockscreen. Actually apply this more broadly so that even below lockscreen, we finish this activity on screen off, IMO it is jarring to go in through lockscreen and see our permission dialog again without context of having just opened camera. * tweak permission dialog to not be cancelable, and to finish activity on back button press. * excludeFromRecents on the activity to prevent dual recents for Camera to show up when opening both via SecureCameraActivity and CameraActivity. Bug: 22502696 Change-Id: Ib545d3baa2d83b52604eec5517047b0c6278cd92
/packages/apps/Camera2/src/com/android/camera/PermissionsActivity.java
|
148d0b8e3fd412fa6a666e75484fe6b7e0465f5a |
|
09-Jul-2015 |
zafir <zafir@google.com> |
Launch PermissionsActivity if CameraActivity resume is called without critical permissions. Bug: 22358833 Change-Id: I5c189d4976b9355d531e028ecc163bb67bae6987
/packages/apps/Camera2/src/com/android/camera/PermissionsActivity.java
|
ad44cda82fe6ec5ee090115129223c6314f9e1bb |
|
29-Jun-2015 |
zafir <zafir@google.com> |
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 Change-Id: I603acfb3057ba26b9cfa7935eb4cb24b5d547cb5
/packages/apps/Camera2/src/com/android/camera/PermissionsActivity.java
|