Commit Graph

340 Commits

Author SHA1 Message Date
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
Jeff Gaston
c2100af2f6 Update for sdk drop
Bug: 77554455
Test: m -j checkbuild
Change-Id: Ia9255ae441d490276c7a9c498b75708f90bf84a1
2018-04-04 15:56:53 -04:00
Brad Stenning
38b46f82f7 Add an option to display HVAC temp values in sysui
Bug: 77148007
Test: on device that has a real HVAC unit
Change-Id: I97b303dd947858157ede72c5d537ae6a1e40cc67
2018-03-28 15:49:56 -07:00
Svetoslav Ganov
2d20fb47f4 APIs to watch active op changes
System singed components can watch for starting/finishing of
long running app ops. Also protected the APIs to watch op mode
changes with a singature permission for the cross-uid use case.

Test: atest com.android.server.appops.AppOpsActiveWatcherTest

bug:64085448

Change-Id: Id7fe79ce1de4c5690b4f52786424ec5a5d9eb0fa
2018-02-16 18:29:04 -08:00
Qingxi Li
ceb94979e3 Merge "Public EuiccManager APIs." 2018-02-12 22:09:53 +00:00
Beverly
796282accb Use activity-alias to show usb debugging dialog
Test: UsbTest in cts verifier
Change-Id: Ib5b6db7175093cc55fadf6c063baa7e6eea71608
Fixes: 73152503
2018-02-12 11:26:29 -05:00
Holly Jiuyu Sun
4f73b9c09a Public EuiccManager APIs.
Public EuiccManager and other related necessary files.
Mark EuiccCardManager and other related necessary files as @SystemApi.
Solve lint errors and warnings.

Bug: 35851809
Test: test on phone
Change-Id: I68853e134e1e31fa9b91a83af6c491a2a8cca971
2018-02-08 11:12:30 -08:00
Narayan Kamath
fdbc611502 SystemUI: Remove obsolete dependency on android.car.
Car related functionality was removed in efa42d2cc5.

Test: make
Change-Id: Ieb54aa23a3d028705bf70a707406041fa2a6a0d4
2018-02-06 16:10:02 +00:00
Alison Cichowlas
76f0ccb5f1 Revert "Security model for moving sharesheet to systemui"
This reverts commit 88f3d4dbe1.

Bug: 72554856
Test: repro instructions in bug
2018-01-29 16:34:33 -05:00
Selim Cinek
2627d72e61 Launching Notification animations inline
Using the new control mechanism introduced in order
to coordinate notification launches and smoothly
transform the notification into the launching window.

Bug: 69168591
Test: add notification, launch it
Change-Id: Ib2d671c65f276ec596a2f07edf64d65bf27a2882
2018-01-24 23:29:28 +00:00
TreeHugger Robot
8b4e2ddc41 Merge "Slider always represents absolute brightness" 2018-01-24 21:45:07 +00:00
Geoffrey Pitsch
d997d191ed Merge "Security model for moving sharesheet to systemui" 2018-01-24 17:33:59 +00:00
Michael Wright
d846023804 Slider always represents absolute brightness
Currently the slider represents a gamma adjustment to the brightness
curve when auto brightness is enabled and the absolute screen brightness
when it's not. This is a fairly confusing behavior to most people, so
this consolidates them to a single behavior: the slider always
represents the current brightness and auto-brightness will automatically
adjust it.

This also moves a bunch of the brightness methods from PowerManager over
to DisplayManager, since it's really the DisplayPowerController that's
responsible for determining and setting the display brightness.

Test: atest com.android.server.display.BrightnessMappingStrategyTest
Bug: 69406898
Change-Id: I73b5982809a94cd50d563426a72d7965e923c994
2018-01-24 15:55:05 +00:00
Alison Cichowlas
baf009b560 ScreenshotActionReceiver must be listed in manifest.
Bug: 72387021
Test: Manual verification against repro in bug
Change-Id: I3e42adec06c63155e4e1bf3c9a5b5abe65fe29c6
2018-01-23 15:10:39 -05:00
Geoffrey Pitsch
88f3d4dbe1 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: I3600e1a8ff9eea7397f5f59853423c79b6401f98
2018-01-23 10:23:55 -05:00
Jason Monk
e8f8be7698 Revert "Revert "Slices permission model""
This reverts commit 1214c878a8.

Test: boot device
Bug: 72270082
Bug: 68751119
Change-Id: I7d0e709a04ffeb8b877aef539a978ee251a75742
2018-01-21 11:53:28 -05:00
Artem Iglikov
1214c878a8 Revert "Slices permission model"
This reverts commit f762496b7f.

Reason for revert: continuous crash, blocks LON from working on master

Test: flashed build from TreeHugger and verified that it boots and doesn't crash anymore
Bug: 72270082
Change-Id: I68d771357488c5c17ab00803d8f51a6c7ed37d01
2018-01-21 13:09:23 +00:00
Jason Monk
f762496b7f Slices permission model
- Launcher/assistant get access to all slices
 - Apps with uri access to access a specific slice
 - Apps without access get a permission granting slice
 - If the user authorizes access to the slice for the app
   then the app will be granted access to the app's slices
   (this happens through a temp grant in the service, and a
   full uri grant from the app the next time it binds)
 - Add a hint that apps to add to allow them to return different
   slices depending on the caller, this allows custom permission
   checks.

Test: runtest --path frameworks/base/services/tests/uiservices
Bug: 68751119
Change-Id: I8f8cd0182cfcbfba3f307e2eaba5aae6f6fbe214
2018-01-20 20:35:31 -05:00
Jeff Sharkey
4a539441d8 Start using new reserved disk GID.
We recently created a new GID that can be granted to critical system
processes, so that the system is usable enough for the user to free
up disk space used by abusive apps.

Define a permission for the GID so we can grant it to system apps,
and add the GID to core apps needed for system stability.  (The list
was mostly derived from filling a disk and seeing what caused the
device to fall over.)

Test: builds, boots
Bug: 62024591
Change-Id: Icdf471ed3bed4eeb8c01f1d39f0b40c1ea098396
2018-01-07 19:40:29 -07:00
Lucas Dupin
957e50ccdf Custom message in AoD
Optional message that lives under the clock and also
in AoD. Implemented using a slice.

Test: launch sysui, look at the date in AoD
Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardSliceProviderTest.java
Change-Id: I9dbc827bd48c6a3d1b25b0a481ffaecc0dd37f25
2017-11-02 18:03:40 -07:00
Fan Zhang
9602831b43 Move summary_empty to settingslib
And use it as summary for SystemUI tuner activity.

Change-Id: I7a36c8aef9e43bff5a6c3a2329ee85478620c533
Fixes: 65612375
Test: rebuild
2017-10-09 13:50:55 -07:00
Winson Chung
9649772461 Merge "Alternative fix for preventing PiP from screenshot sharing." into oc-mr1-dev
am: 6d753c88d9

Change-Id: Iffd473679aab7ca6f92852b664074b82d5198b17
2017-09-08 05:58:59 +00:00
Winson Chung
ed376a36a3 Alternative fix for preventing PiP from screenshot sharing.
- Revert 942a85c6d6
- Use a more specific fix for the triggering of PiP from the SysUI
  screenshot share intent.

Bug: 63984385
Bug: 63581685
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: Click share on the screenshot action, ensure activity below does
      not enter PiP
Change-Id: Id8041d50dd429030c20940dca19e5c62bbc0c6a4
2017-09-07 17:52:37 -07:00
Qingxi Li
36df0e96f5 Merge "Fix problems of SIM lock screen of eSIM" into oc-mr1-dev
am: e8d01e269b

Change-Id: Id87f4ba6162cc1e0a60d13004e3adf586c8f5819
2017-08-16 21:29:04 +00:00
qingxi
ccae10e692 Fix problems of SIM lock screen of eSIM
This CL fixes following issues:
1. The text on the button currently is black (should be white).
2. Clicking on it turns the screen off but doesn't disable the enabled
profile.

Bug: 64227431
Test: E2E
Change-Id: I87eaeb348c32af610a375912ae0aa5c7aa25dba7
2017-08-14 14:48:48 -07:00
Jason Monk
abe21281e5 Merge "Prevent data usage dialog from being displayed again" am: 48e8091eda am: abff77e4aa am: 0119a09bdf
am: c23afeeeee

Change-Id: I38f85d00cd1f75ce6fe0c2a82f621e1cb1d939b2
2017-08-09 22:09:55 +00:00
Jason Monk
c23afeeeee Merge "Prevent data usage dialog from being displayed again" am: 48e8091eda am: abff77e4aa
am: 0119a09bdf

Change-Id: Ia84c713c1cd71d65981642ad6411192be3955445
2017-08-09 18:24:25 +00:00
Jason Monk
abff77e4aa Merge "Prevent data usage dialog from being displayed again"
am: 48e8091eda

Change-Id: Iaf17879b3a708585a2ae4cc7460527a3f998bce4
2017-08-09 17:47:52 +00:00
naoyuki kato
132bb86070 Prevent data usage dialog from being displayed again
The data usage dialog is displayed every time rotating the device.
To solve this issue, prevent NetworkOverLimitActivity from being
re-created when rotating the device.

Bug: 36801016
Test: manual - show NetworkOverLimitActivity and rotate the device

Change-Id: I51429aa49157756107e9b3fa9d450f82f894dcab
2017-08-08 03:44:50 +00:00
Lucas Dupin
ef15776aaf resolve merge conflicts of a1f64b0a91 to oc-mr1-dev
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ic2395d055e1f27b186c3b87be5440dc410ee16a3
2017-07-25 12:00:01 -07:00
Lucas Dupin
e17ce5286f Fix jank when switching themes
Turning overlays on and off takes time,
it also doesn't allow us to have fine control
over which view is using which theme.
Lock screen colors are now driven by themes.

Change-Id: Ie8860d00dbb0705ed76edf60a9d3030618dd21ca
Fixes: 63751714
Test: Visual. Set wallpapers, unlock.
Test: runtest -x packages/SystemUI/tests/src/com/android/keyguard/KeyguardSecurityContainerTest.java
Test: runtest -x tests/Internal/src/com/android/internal/colorextraction/ColorExtractorTest.java
Test: systrace
2017-07-24 13:26:22 -07:00
Jorim Jaggi
7f58322d51 Revert "Fix jank when switching themes"
am: 6498f96283

Change-Id: Ie5813f1c04a6db9d5ee291df764873900add5064
2017-07-24 14:14:34 +00:00
Jorim Jaggi
6498f96283 Revert "Fix jank when switching themes"
This reverts commit e5d0b9dddb.

Fixes crashloop with lock pattern

Change-Id: I3721444c91e2be625c59ec3e6ba14f1080badc07
Fixes: 63980375
2017-07-24 15:53:42 +02:00