Commit Graph

372 Commits

Author SHA1 Message Date
Robert Snoeberger
ceb2bc6e79 Disable ClockOptionsProvider so clocks don't appear in picker app
Bug: 136090066
Test: `adb shell content query --uri content://com.android.keyguard.clock/list_options` fails with could not find provider
Change-Id: I88433c3d4cfbde388c4ace9b726fb4f53f404d48
2019-06-26 16:22:39 -04:00
Fabian Kozynski
ade26fa73a Restore WATCH_APPOPS permission for systemui
This permission is necessary for Q as it allows systemui to tag
notifications of apps that are using certain AppOps. This is a P
feature that has regressed when the permission was made privileged.

This is used by AppOpsController in order to obtain updates on any apps
(onOpActiveChanged, onOpNoted). There is no other way to obtain the
updates from apps that are not systemui, as specified in AppOpsManager.

Talked to moltmann@ to verify that this is the correct API to use for this feature.
I'll remove this permission once SystemUI does not need it anymore.
In particular, if AppOpsController does not require it for being notified of AppOps changes.

Fixes: 134747188
Test: build
Test: dumpsys SystemUI. Check that AppOpsController is getting updates.
Change-Id: I08cca4361a7fbfa8b2eb419f1459b0b8bce93a5f
2019-06-07 17:38:01 +00:00
Jeff Sharkey
b66f4f4bad Aggresive performance optimizations.
Now that we have LocalCallingIdentity, we can start caching it in
very narrow cases.  We must be careful to not cache too long, since
any changes to granted permissions for the UID mean we need to
re-evaluate any cached answers.

The best middle-ground for this in the Q release is to use an active
camera session as a proxy for when we should create a cache object
and then later invalidate it.  (It's very unlikely that a user
changes permissions while actively using the camera, and this is
a strong signal that the caller is sensitive to performance.)

Many other sprinkled optimizations to avoid extra binder calls into
the OS, such as aggressively caching VolumeInfo related details.

Track IDs that are owned by each LocalCallingIdentity, to speed up
all future security checks.

Dispatch all change notifications asynchronously, and delay them by
several seconds while the camera is being actively used, to give
more important foreground work a fighting chance.  Invalidate
thumbnails asynchronously.

Optimizations to ModernMediaScanner where it's safe to skip the
"reconcile" and "clean" steps when we're focused on a single file
that we successfully scanned.

Local tests show this CL improves performance of a test app that
takes 100 rapid shots by 45%.  (All the collective optimizations
done so far this week add up to a 70% improvement.)

Bug: 130758409
Test: atest --test-mapping packages/providers/MediaProvider
Exempt-From-Owner-Approval: trivial manifest change
Change-Id: I38cc826af47d41219ef44eae6fbd293caa0c01d5
2019-05-18 05:48:21 +00:00
Narayan Kamath
05f010b8e4 Improve polish for the MediaProjectionPermissionActivity.
- Change title styling / padding per UX spec.
- Also, fully support dark theme..

Test: visual, both in dark and light themes.
Bug: 131210470
Bug: 129787693
Change-Id: I150533c063feaa1be2879f34b5b6ac604f265e23
2019-05-10 18:34:01 +01:00
Lucas Dupin
046282eabd Dark Theme QS tile
Creates Dark Theme tile and adds it to the default config,
under the fold.

Test: manually toggle tile
Fixes: 130253100
Change-Id: I2859d2eb20db1c6d9dd8e8e24979294316b905bb
2019-04-11 09:58:11 -07:00
Sunny Goyal
a6a581279a Using input monitor for edge swipe handling for back
Bug: 112934365
Bug: 124299674
Bug: 124298541
Test: Verified build on device
Change-Id: Ic4cc4339b22aee63b0d96587f05dae3d8c01563f
2019-04-03 10:22:34 -07:00
Philip P. Moltmann
129a0b0c5e Remove dual storage permission model
- Also remove typed media permissions
- Leave typed media app-ops

Bug: 129716569
Test: Used apps, looked at permissions in the UI
Change-Id: If7714fb1a6955584157e1a60ab72b09e35287827
2019-04-01 16:30:11 -07:00
Jeff Sharkey
859856d8d6 Unify media permissions enforcement in framework.
This opens the door to the same consistent logic being shared by
anyone across the OS who wants to enforce storage permissions.

Bug: 126788266
Test: atest --test-mapping packages/apps/MediaProvider
Exempted-From-Owner-Approval: Trivial permissions refactoring
Change-Id: I3107425f8dafa6ba05918bb67c3c0cb5d3899657
2019-03-26 23:54:08 +00:00
Narayan Kamath
b4bfa1b4e9 SystemUI: Update styling of media projection permission dialog.
Test: Visual
Bug: 128426351
Change-Id: I73e0af423157ccda11632fb96d13e4f981bb57bb
2019-03-20 13:21:13 +00:00
Philip P. Moltmann
e3dbb5ad0a Show only user sensitive ops in system ui
Test: Looked at system ui button when starting maps and camera
Change-Id: Id6a9a64162200281c5c94671668255f258db36b3
2019-03-08 14:50:23 -08:00
Stanislav Zholnin
0ec928db47 Add READ_DEVICE_CONFIG permission to SystemUI to
allow access to DeviceConfig API. Permission checks in DeviceConfig
API will be added later.

Test: tested locally with permission checks patch in.
Change-Id: Id5c72eb80f59820d461d74772243ed357df7cb37
2019-03-05 16:28:58 +00:00
Ahan Wu
67e7f1054f Render ImageWallpaper with OpenGL ES and apply visual effects. (Fix bug)
We have to render image wallpaper with OpenGL ES to apply some amazing
visual effects.

Bug: 122803209
Bug: 124073420
Bug: 123616712
Bug: 123615467
Test: Manually.
Change-Id: I0123d4ba2acb5a84b709c0468910e006c8e49563
2019-02-16 16:19:33 +08:00
Kevin Chyn
ca21820979 Add MANAGE_BIOMETRIC permission to SysUI
It's required for resetting lockout

Test: manual
Change-Id: If6a7172dbd7efe26d40b80d629bef33db11f0a48
2019-02-14 16:01:12 -08:00
TreeHugger Robot
a42845b025 Merge "Revert "Render ImageWallpaper with OpenGL ES and apply visual effects."" 2019-02-07 02:02:34 +00:00
Lucas Dupin
98897ce6c5 Revert "Render ImageWallpaper with OpenGL ES and apply visual effects."
This reverts commit 9a8e260af1.
Bug: 118658627

Reason for revert:
I've received a few bug reports indicating that images were getting stretched, animations were gone and sometimes nothing would be rendered.

I'll revert the CL to have something for stable for Beta 1. We can then work on the fixes after the Taiwan team is back from vacation.

Change-Id: Id09ba3d7f372af9153c056a12e676c0227d19939
2019-02-06 20:43:36 +00:00
TreeHugger Robot
92a70d42d2 Merge "Add ClockOptionsProvider for more realistic previews." 2019-02-05 14:31:30 +00:00
Robert Snoeberger
6b244b093c Add ClockOptionsProvider for more realistic previews.
This change enables the picker app to move to the new
ContentProvider but it doesn't change any of the
assets. A follow-up change will dynamically generate
a realistic preview image from the clock.

Bug: 123704608
Test: atest on new tests ClockInfoTest and ClockOptionsProviderTest
Change-Id: I744c8dd063f6aa112e290fcf54cdc0e0b1377a0e
2019-02-04 17:33:19 -05:00
Selim Cinek
1f4459783c Merge "Render ImageWallpaper with OpenGL ES and apply visual effects." 2019-01-30 20:56:12 +00:00
Ahan Wu
9a8e260af1 Render ImageWallpaper with OpenGL ES and apply visual effects.
We have to render image wallpaper with OpenGL ES to apply some amazing
visual effects.

Bug: 122803209
Test: Manually.
Change-Id: I8d702a59211de58f912f2a18cb54b6e807c6e457
2019-01-30 19:00:36 +08:00
Alison Cichowlas
8a85cd814f Remove CHOOSER_UI intent filter.
Unused in practice as flow is still via framework in order to pick
up token.

Bug: 120572352
Test: atest SystemUiTests;  atest cts/tests/signature/intent-check/src/android/signature/cts/intent/IntentTest.java
Change-Id: I8497cdd7ddd4c4e1c905e9e19e24e92d4d54004d
2019-01-25 16:20:33 -05:00
Badhri Jagan Sridharan
392b747d4b UsbContaminant dialog
Bug: 119642987
Bug: 117330206
Bug: 77606903

Test: Ran the following sequence:
1. Add simulated port: dumpsys usb add-port "matrix" ufp
2. Set contaminant present to true:
   dumpsys usb set-contaminant-status "matrix" true
   Contaminant present notifcation shows up and dialog pops up upon
   clicking the notification.
3. Set contaminant present to false:
   dumpsys usb set-contaminant-status "matrix" false
   Contaminant present notification is dismissed and the safe to use
   notification shows up.

Change-Id: I33d22caafbedb2a21a0f61f663ebddf5c9e3f84b
2019-01-23 10:43:15 -08:00
Michal Karpinski
7b97a0267b Add a new START_ACTIVITIES_FROM_BACKGROUND
signature|privileged|vendorPrivileged|oem
permission

And grant it to SystemUI and Shell (adb shell am start).

Bug: 110956953
Test: atest WmTests:ActivityStarterTests
Change-Id: I4885a9a62ee8d47a3aef85f0e34b746c3f51ca2b
2019-01-14 18:13:47 +00:00
Chad Brubaker
90f391fe87 Prototype Spaceship mode qstile
Initial prototype disabling location/sensors and enabling airplane mode.
Camera/Mic will come in a followup.

Test: manual
Bug: 110842805
Change-Id: I26132fcc9ffea83e3e78a0e54882d23c99ee590c
2018-12-14 20:46:04 +00:00
Christine Franks
39b0311db8 Add IColorDisplayManager
- Add IColorDisplayManager
- Add CONTROL_DISPLAY_COLOR_TRANSFORMS permission

Bug: 111215474
Test: atest FrameworksServicesTest:ColorDisplayServiceTest
Change-Id: Ia8182ccc80c1733f00c62b136e7950e2d2092d75
2018-11-28 17:21:30 -08:00
Zimuzo
b3b9c26543 Add privileged API to control keyguard secure notifications
I688e87cf09ad206f4f517a7be960c2aa01af8fc4, restricted privileged apps from silently becoming Device Admins.

Ia4e1ce9b81756e7f84ed0aa22d97e0b968cd8d89 added privileged APIs for locking the device and resetting the password.
We continue that work by providing an alternative for DevicePolicyManager#setKeyguardDisabledFeatures guarded by android.permission.CONTROL_KEYGUARD_SECURE_NOTIFICATIONS

Bug: 111153365
Bug: 112601004
Test: Secure notifications can be redacted on keyguard
Change-Id: If81cecf6e74f7abcff581a122c4b68cc04ff57c6
2018-11-16 22:00:43 +00:00
Alison Cichowlas
3e34050a42 Re-patching in Sharesheet security model changes.
Previously reverted due to b/72554856, fix for that in topic.

Original commit message:

Security model for moving sharesheet to systemui

ResolverActivity (still in frameworks) now requests a "permission token"
that it hands to a stubbed system ui activity ChooserActivity.

This permission token allows an app (SysUI) with the signed permission
"START_ACTIVITY_AS_CALLER" to call
ActivityManagerService#startActivityAsCaller. Permission tokens are a
one-time use, limited-time offer.

Test: runtest systemui && manual testing
Bug: 69850752
Change-Id: Ia50e21e2f8c6b6d0ed7207625e3b5aef214396bb
2018-11-09 11:01:54 -05:00
Kenny Root
8b0a22dbad Merge changes from topic "usb-adb-separation"
* changes:
  Update USB tests for ADB split
  Move AdbDebuggingManager to AdbService
  AdbService: move source of truth for enabled
  Add empty AdbHandler
  Add systemReady call for AdbService
  Add function to query ADB state
  Register USB as an ADB transport type
  Add ADB transport skeleton
  Add empty AdbManagerInternal for system server
  Add empty AdbService to SystemServer
  Move ADB debugging manager to core
  Rename to AdbDebuggingManager
  Move UsbDebuggingManager to new package
2018-11-02 00:43:05 +00:00
Beth Thibodeau
5898ac47b2 Adding screen recording function.
Screen recording can be launched via long press on screenshot in
the global actions menu if the local feature flag is enabled.
Otherwise, long press on screenshot will also trigger a screenshot.

Demo videos: https://drive.google.com/open?id=1oJzfzJb8aGXSUqn4CZ_Yn7qWmJ2dvRd5

Test: manual
Change-Id: I373d38ad86291ff6f26f7dca3195001bd8f5ee16
Bug: 111395687
Bug: 118826991
2018-11-01 15:56:39 -04:00
Kenny Root
a5964c08bc Move AdbDebuggingManager to AdbService
Also remove the "Usb" from the AIDL function since it's not really
related to USB.

Test: make
Bug: 63820489
Change-Id: Ibf23964665a115a5bc835820dcff98aaf7ba610f
2018-10-31 16:11:02 +09:00
Kenny Root
7c4e66190e Rename to AdbDebuggingManager
Rename the UsbDebuggingManager to AdbDebuggingManager. It doesn't
technically depend on the USB stack, so rename to make the lack of
association more clear.

Bug: 63820489
Test: make
Change-Id: Ife83d3ec9701882781f5a9562ccc5435d51d246b
2018-10-31 16:11:01 +09:00
Winson Chung
2dbcf0973b Moving SysUI with legacy Recents to another build target
- Move all legacy recents code out of the core sysui code
- Add separate target for products which still depend on it
- Move overview proxy implementation into another implementation of the
  recents interface

Test: atest SystemUITests
Test: Push SystemUiWithLegacyRecents to the system image
      adb shell pm disable com.google.android.apps.nexuslauncher/com.android.quickstep.TouchInteractionService
      and ensure that the old recents implementation still works (and split
      screen)

Change-Id: Iad67218ec37c13c79b6393d87f6bdc4f3996e2c6
Signed-off-by: Winson Chung <winsonc@google.com>
2018-10-26 10:15:50 -07:00
jovanak
edba98c1c8 Adds automatic switching to Guest if user starts driving with the keyguard
up.

driving_on_keyguard_timeout_ms controlls the number of milliseconds we wait,
before switching to Guest. If this number is negative, feature is disabled.

Change-Id: Ic1357362a97cb14a4f221d53e17a30cd3fefc5ea
Fixes: 110228676
Test: manual testing on mojave and emulator. Toggling driving state and keyguard, and observing the timer logs and switching.
2018-10-23 15:50:19 -07:00
Lucas Dupin
7c6ca76793 Allow protected broadcasts in tests
SysUI must send protected broadcasts to avoid system impersonation.
Our tests should also allow these types of broadcasts, otherwise
they will be dropped/skipped on -user builds and functionality
will be broken.

This CL also protects the flashlight broadcast.

Fixes: 110825884
Test: atest com.android.systemui.qs.external.TileServicesTest
Change-Id: I5a3dfc569c1695366e5f0e48cda8a7a32e287e7d
2018-09-14 17:18:54 +00:00
Kevin Chyn
a24e9fd9ac Add BiometricPromptService
The change introduces the following:
  - BiometricPrompt communicatates with BiometricPromptService (new)
    system service. The service does the decision making for which
    biometric modality to use.
  - As a result, a lot of logic is moved from <Biometric>Manager
    to BiometricPrompt. FingerprintManager now does not care about
    BiometricPrompt logic anymore (reverts several P changes).

Face, and all future <Biometric>Service interfaces must be protected by
the signature-only MANAGE_BIOMETRIC permission. Settings, SystemUI, and
BiometricPromptService are their only clients.

Bug: 72825012

Test: BiometricPromptDemo works
Test: Keyguard works
Test: Settings works

Change-Id: I2b7d6eff81bc07950202c50e592d733032523bf0
2018-08-30 14:49:32 -07:00
Winson Chung
06ca274429 Allow share/edit screenshot actions from lockscreen
- Dismiss keyguard when routing the actions through the proxy receiver
- Fix issue with edit activity also disallowing auto-enter PiP
- Minor cleanup of some unused/shared code

Bug: 72459081
Test: Launch share/edit screenshot from lockscreen (and normally)
Test: Launch screenshot share action with auto-enter PiP activity and
      ensure it does not trigger PiP

Change-Id: Ibae2de51bc3fe10f439d7506ab7d0d9243142c94
2018-06-29 17:36:29 -07:00
Gilad Bretter
cb51b8b847 4/n: Add face authentication framework
This change is cherry-picked and rebased from AOSP
https://android-review.googlesource.com/c/platform/frameworks/base/+/660242

Add face recognition as an identification method, following fingerprint
design. Unlike fingerprint, only one face template can be enrolled per
user, and a vendor message is passed from the HAL all the way to the
client callback to allow GUI indication about the enrolled face
templates.

Add FaceAuthenticationManager and FaceService.
Add face authentication capability to TrustManager and Keyguard.
Modify TrustManager and KeyguardUpdateMonitorCallback fingerprint code
to support generic biometric method to eliminate duplications.
Add BiometricSourceType enum to keep track of the specific biometric
method.

Test: biometric authentication still works on the device

Fixes: 110385761

Change-Id: I5d04fe69a112c13d3ef7330b9c08c146e36c5335
Signed-off-by: Gilad Bretter <gilad.bretter@intel.com>
2018-06-21 17:00:07 -07:00
Jason Monk
3257ce60dc Merge "Protect broadcasts we use to talk to settings" into pi-dev am: 3dbd752246
am: f65e34a95b

Change-Id: I658a1aef8695fe8bd64e93d623631b6ab3133fc2
2018-05-31 15:28:53 -07:00
Jason Monk
636741f84a Protect broadcasts we use to talk to settings
Test: manual
Change-Id: If383f94caccc0221e4a34a388142ff9ca4c00d29
Fixes: 80245419
2018-05-31 10:32:57 -04:00
Jason Monk
3a3c2157da Merge "Final cleanups to permission slices" into pi-dev am: 64a33d695d
am: 3f3f1ebc17

Change-Id: I075703514267496004435b984733133c3a8887bf
2018-05-25 15:34:58 -07:00
Jason Monk
b14dde0793 Final cleanups to permission slices
- Add icons to the right and shortcut modes
 - Add color
 - Make sure dialogs are secure

Test: manual
Bug: 79960669
Change-Id: I6d251b0ea5bd3c1b3eed32b184e4aae22c52ffb5
2018-05-25 15:42:16 -04:00
Svetoslav Ganov
f748f4bd6f Merge "Expose media projection consent UI to instant apps" into pi-dev am: efaec53af9
am: 159b388260

Change-Id: Ia3ce898c0507cf08179baa907b7174041f8e70a9
2018-05-07 19:07:21 -07:00
Svetoslav Ganov
efaec53af9 Merge "Expose media projection consent UI to instant apps" into pi-dev 2018-05-08 00:26:03 +00:00
Lin Guo
02e10178d6 Merge "Refactor CarVolumeDialogImpl to use CarAudioManager" into pi-dev am: d9772708ef
am: 63ccd793da

Change-Id: Ie71b307ab6fae37d589d9e82be1bcb46a9e178b1
2018-05-07 17:00:42 -07:00
Svet Ganov
beec97eb5e Expose media projection consent UI to instant apps
Test: cts-tradefed run cts-instant-dev -m CtsViewTestCases

bug: 79221467

Change-Id: I5ebf0a4ba643fdc17bacdc68f445ea47321344f4
2018-05-03 17:35:03 -07:00
Lin Guo
d7468d4d54 Refactor CarVolumeDialogImpl to use CarAudioManager
Using CarAudioManager to get volume change callback and set volume
change.

BUG: 78766946
Test: manual
Change-Id: I0563938ca20ad83b4b0de0b7cfe780bb6a97b0fd
2018-05-03 15:21:14 -07:00
Dan Sandler
eb18cffdc5 resolve merge conflicts of e323532e81 to master
Bug: none
Test: just a compile fix
Change-Id: Iec4989e84126f1c5695a8b284f222946c74886e1
2018-05-02 17:52:00 +00:00
Dan Sandler
4d90d1ede7 SystemUI heap monitor & hprof dump tile.
Adding the tile to your active set will start a continuous memory tracker,
updating the tile every minute with the latest pss value. Tapping the tile
will pull a full heap dump, zip it, and share it via ACTION_SEND.

Additionally, @integer/watch_heap_limit can be set to the heap size (in KB)
at which ActivityManager will automatically generate a heap dump and notify
the user when it's ready.

Available only on IS_DEBUGGABLE builds. Supplies limited. Order now!

Bug: 76208386
Test: atest com.android.systemui.util.leak.GarbageMonitorTest
Test: runtest systemui
Change-Id: I0434dd7dc330784c750469b013e40b31ef92638d
2018-05-01 21:51:15 +00:00
Aurimas Liutikas
fd52c1433c Migrated SystemUI & SettingsLib to androidx
Test: make SystemUI SettingsLib
Bug:76692459
Change-Id: I248fdf4042a0a97bc6349091da21c936c2d37c95
2018-04-20 12:48:23 -07:00
Jason Monk
0c179a94a9 Slices: Don't use public namespace for internal intent
Test: manual
Change-Id: I21bc0a367456b58de195d71fc29cca0dbbca6927
Fixes: 78214697
2018-04-18 10:37:19 -04:00
Kai
a45c7a6d1f Cleanup after updating Vehicle permissions
Cleanup after updating Vehicle permissions.

Bug: 77860745
Test: Compiles
Change-Id: Iaebabe1825c0c01f1e86653cdf407832ffd84555
2018-04-11 00:10:22 +00:00