OSDN Git Service

Camera M permissions: lockscreen improvements
authorzafir <zafir@google.com>
Wed, 15 Jul 2015 08:14:10 +0000 (01:14 -0700)
committerAlan Newberger <alann@google.com>
Fri, 17 Jul 2015 18:09:18 +0000 (11:09 -0700)
commitdd334be92c5513a06c809ee3ea25e411dfad0589
treebb8427074363748c8fd998370898262aa4d9c4f6
parent34663b0fd4a21a6c107c6df313bcbd1548235fd5
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
AndroidManifest.xml
res/layout/permissions.xml [new file with mode: 0644]
src/com/android/camera/PermissionsActivity.java