Commit Graph

320 Commits

Author SHA1 Message Date
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
Lucas Dupin
902ba7bab5 Merge "Fix jank when switching themes" into oc-dr1-dev
am: a74f575ff9

Change-Id: Ibc8fa59cfa6139b03aa7fb08361eb43331484be5
2017-07-22 04:52:31 +00:00
Lucas Dupin
e5d0b9dddb 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: I4b5db6234cafebbe8eaa952781c038370a11488b
Fixes: 63751714
Test: Visual. Set wallpapers, unlock.
Test: runtest -x tests/Internal/src/com/android/internal/colorextraction/ColorExtractorTest.java
Test: systrace
2017-07-20 22:44:36 -07:00
Fan Zhang
1137f872c6 Use new settings preference theme in sysui tuner
- Also removed deprecated activity manifest entry for tuneractivity

Change-Id: Id3a8d25cd9e2bf18c999e273714a2b82fd14ffe8
Fix: 36663882
Test: visual
2017-07-11 14:58:07 -07:00
TreeHugger Robot
f490ae3e59 Merge "PIP: Fix crash when the PIP menu activity is started by intent" 2017-07-10 02:17:17 +00:00
Jaewan Kim
c1d1524b34 PIP: Fix crash when the PIP menu activity is started by intent
This also cleans up unused PIP activities from the Manifest file.

Bug: 37912313
Test: Manual test as follows
  - Checked that my test app crashes when it sends intent to start
    the PIP menu.
  - Checked that starting the PIP menu activity with the am command
    doesn't cause System UI to be crash.
Change-Id: I3a8171fcf6017c2616b8e83ab8a281b5d7e56ab7
2017-07-07 18:35:48 +09:00
Marc Hittinger
bc6a3043a2 Merge "Remove redundant hwaccelerated enabling." 2017-06-15 17:15:42 +00:00
Lucas Dupin
987f1937a0 Change keyguard theme when wallpaper colors change
Bug: 38163994
Bug: 37014702
Bug: 62053168
Test: visual
Change-Id: I5a2da4ef2ad6fc1dab71588f2d0f5bd207731900
2017-06-01 12:14:53 -07:00
Marc Hittinger
fc25704a86 Remove redundant hwaccelerated enabling.
Hardware acceleration is enabled on the application level in the
manifest. This cleanup-only CL removes redundant calls to enable
hardware acceleration on the level of activity, window, or view.

Test: Ran systemUI jank tests checking for lack of jankiness.

Change-Id: I37a9b687be3aaf95f9ba497e99cabd5f8c73ace1
2017-05-30 11:18:36 -07:00
Jason Monk
0ed316b7f1 Merge "Change brightness dialog theme" into oc-dev am: 3b5934b267
am: c4d9ac6d18

Change-Id: I648fc03f0fb1395f6ac0e8bd77b7389afa30891b
2017-05-30 17:04:18 +00:00
Yoshinori Hirano
2dd296f288 Change brightness dialog theme
Added new theme Theme.DeviceDefault.QuickSettings.Dialog and applied it
to the brightness dialog.

Fixes: 62010126
Test: visual

Change-Id: I3bc1116a227d5e62d8624c9a4911771152f3ced0
2017-05-30 10:50:34 -04:00
Todd Kennedy
6312b3c4f5 Merge "Filter package related info" into oc-dev am: 72b7b1f001
am: 36482247ea

Change-Id: I8b5a7d1c08e7d6f822347aaed2b15e4e270d0a49
2017-05-18 19:51:53 +00:00
Todd Kennedy
e6393c9571 Filter package related info
This is one of many CLs to go through the PackageManager API surface
and filter access depending upon the requested information and the caller.
In this change, we filter ActivityInfo, ApplicationInfo and PackageInfo.

Bug: 35871369
Test: bit FrameworksCoreTests:android.content.pm.PackageManagerTests
Test: cts-tradefed run commandAndExit cts-dev -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.EphemeralTest
Change-Id: Iaefd73f912ab1c7e1844e72625388455f783a362
2017-05-16 16:13:52 -07:00
Rebecca Silberstein
763b36c7eb Merge "SystemUI: add NETWORK_SETTINGS permission" into oc-dev am: 276b63dc9e
am: 75a7b33a1a

Change-Id: I4b793246f4fe1c6ac6fcacb8e1d84cdd9f2e3214
2017-05-12 21:17:48 +00:00
Rebecca Silberstein
a21587481f SystemUI: add NETWORK_SETTINGS permission
Add the NETWORK_SETTINGS permission to the sysui components so we can
properly check for allowed callers in WifiService.

Bug: 36760523
Test: make
Change-Id: Ia054ffad7a9508e0d80f7b3a444691373ad1924f
2017-05-12 15:58:43 +00:00
Winson Chung
6a35c71610 Merge "Allow Recents to rotate freely." into oc-dev am: 05aa65cfb9
am: 0f800e671a

Change-Id: I33099e0c6c2ee76eb6ad12cc41d3f79d542b0358
2017-05-12 08:53:48 +00:00
Winson Chung
6c8536c3a2 Allow Recents to rotate freely.
Bug: 37550022
Test: Switch between landscape apps while the device is in landscape
Change-Id: Ic035a1e929f7da0b0a01b11c219a7146aa36f811
2017-05-11 13:07:10 -07:00
Jason Monk
a63d5a1bbf Merge "Fix brightness dialog background to be light" into oc-dev am: 175f53b2d6
am: aee0dd3ab0

Change-Id: I75f50fea8b504f7058fda5e83320e172ad298649
2017-05-10 18:59:39 +00:00
Jason Monk
4b29f3756e Fix brightness dialog background to be light
Test: visual
Change-Id: I158af3aa79de39d463ac0b26ef7d73b0430df927
Fixes: 37763715
2017-05-10 10:05:02 -04:00
Dianne Hackborn
8a40a4ca27 Merge "Work on issue #36891897: Need to ensure foreground services can't..." into oc-dev am: f1a4b50739
am: a766f1d1ec

Change-Id: I82c6b62af3d4eddbd4e97c83b2bb7d4a1657c63d
2017-04-30 17:44:10 +00:00
Dianne Hackborn
83b40f69be Work on issue #36891897: Need to ensure foreground services can't...
...hide themselves

The activity manager now keeps track of all apps that are running
foreground services and builds a notification showing them to the
user.  We ensure they are shown to the user for at least 30 seconds
(configurable).  If foreground services are executed while the
screen is off, their apps will be shown to the user for at least
30 seconds after the screen turns back on.

While doing this I am also adding a new process state to distinguish
between "important background" stuff that should bypass bg check vs.
ones that don't.  By default, these now no longer bypass bg check,
which is really the expected (and documented) behavior.  There is a
new bind flag to allow them to bypass bg check, which is currently
only used by the IME.

Also add some new job scheduler commands that will be used to
write new tests cases for jobs timing out.

Bug: 36891897

Test: manual

Change-Id: Ied3f7b56444254513fd776f06b88bc0e54704958
2017-04-29 19:41:12 -07:00