Commit Graph

14992 Commits

Author SHA1 Message Date
TreeHugger Robot
cbb05a317b Merge changes I9ed87db1,Ic0b766f6
* changes:
  Make PermissionControllerManager user aware
  Check same uid for permission and app-op
2019-02-16 22:35:22 +00:00
Philip P. Moltmann
0d05e48371 Check same uid for permission and app-op
In permission checker we used to check the permission for the passed in
uid but the opp-op for the Binder.getCallingUid. In the case the calling
identity was cleared, PermissionChecker ended up checking the app-op of the
current process (often the system server).

Now we check the uid for both the permission and the app-op.

Test: Called PermissionChecker.checkPermission with the calling indentity
cleared.
Fixes: 124116218
Change-Id: Ic0b766f6c75bba1b9dae3e91c6adce85a76ae68f
2019-02-16 12:08:25 -08:00
Michael Wachenschwanz
0056889245 Merge "Populate null UsageStats event task root fields with known data" 2019-02-16 02:50:47 +00:00
TreeHugger Robot
0c2101c6d4 Merge "Add IntDef annotation to parameter foregroundServiceType." 2019-02-16 01:23:18 +00:00
TreeHugger Robot
78ad8c28b7 Merge "Send Keyboard Shortcut broadcasts to current user." 2019-02-16 01:06:22 +00:00
TreeHugger Robot
fe09cbef5a Merge "ContentCaptureManager should be null when the feature is disabled." 2019-02-16 00:57:04 +00:00
Nicholas Sauer
28348ed748 Send Keyboard Shortcut broadcasts to current user.
bug: 124526105
Test: After switching to a secondary user: cts-tradefed run cts-dev -m CtsAppTestCases -t android.app.cts.ActivityKeyboardShortcutsTest#testRequestShowKeyboardShortcuts
Change-Id: I033a3bd0f6df7ca939b3aa7c081a6dbf45f1d63f
2019-02-15 23:39:29 +00:00
Michael Wachenschwanz
08be74fa54 Populate null UsageStats event task root fields with known data
It is possible for an activity's task root to be reported as null to
UsageStats during a destry. Use past known data to populate the fields.

Change-Id: Id20c809580e854ca9075444957bd10a338087e3d
Fixes: 123404490
Test: atest cts/tests/tests/app.usage/src/android/app/usage/cts/UsageStatsTest.java#testSuddenDestroy
2019-02-15 14:44:48 -08:00
Hui Yu
b8dcbeeff1 Add IntDef annotation to parameter foregroundServiceType.
For methods Service.startForeground(int, Notification, int).
Also add IntDef annotation on return value of
ServiceInfo.getForegroundServiceType().

Change-Id: I3f0df5ff44dfb1b0cf2150d6e40d39ac0cd2b2b5
Fix: 124331268
Test: NA.
2019-02-15 11:49:48 -08:00
Winson Chiu
ff172645e6 Merge "Add transient night mode in car mode when targeting Q" 2019-02-15 19:24:55 +00:00
Felipe Leme
d49d52c0ad ContentCaptureManager should be null when the feature is disabled.
Test: manual verification using logcat and dumpsys
Test: atest CtsContentCaptureServiceTestCases

Fixes: 124475449

Change-Id: I699de127bf9e61ba187eb129c38d243d5fc93f1c
2019-02-15 10:32:45 -08:00
Remi NGUYEN VAN
584b1378a8 Merge "Move NetworkStack to services.net" 2019-02-15 07:25:09 +00:00
TreeHugger Robot
93d196b3a8 Merge "Create a DisableInfo object instead of exposing DISABLE_* flags" 2019-02-14 21:43:30 +00:00
TreeHugger Robot
f9723ba1e7 Merge changes from topic "accessibility-usage-dialog"
* changes:
  Make the accessibility op string a SystemApi.
  Add a new intent for reviewing running accessibility services.
2019-02-14 21:04:32 +00:00
Maurice Lam
b8e161804d Merge "Add system APIs to implement locale picker" 2019-02-14 20:03:04 +00:00
Remi NGUYEN VAN
310da6f0e8 Move NetworkStack to services.net
NetworkStack is only used in services.net or clients of services.net. It
cannot stay in framework.jar because it needs to depend on AIDL
interfaces, which would conflict with app implementations if they were
in framework.jar.

(cherry-pick of aosp/905233 with trivial conflicts in SystemServer.java)

Test: atest FrameworksNetTests NetworkStackTests
Bug: 124033493
Change-Id: I501b125a388c1100c2182bde4670944c2f0d7a02
2019-02-14 20:43:43 +09:00
Remi NGUYEN VAN
55b0803ae1 Merge "Remove deps from framework on netd interfaces" 2019-02-14 03:11:32 +00:00
Amin Shaikh
c3f0b06ccc Update notification layouts when overlays change.
- Use the overlay directories specified in the ApplicationInfo retrieved
from PackageManager. The resources directories cached in LoadedApk in
ActvityThread may contain stale values for remote applications.
- Clear StatusBarNotification#mContext when overlays change to ensure
that the Resources for remote Contexts are not stale. These Contexts
will be recreated in the subsequent AsyncInflationTask.

Bug: 120987987
Test: mp core sysuig; change theme using theme picker
Change-Id: I100d164facdd4208610ee6409dd3868d6f304712
2019-02-13 15:34:27 -05:00
Evan Laird
ced4aebd0e Create a DisableInfo object instead of exposing DISABLE_* flags
The DISABLE_* flags fall into two namespaces, helpfully named DISABLE_*
and DISABLE2_*. Seeing as that's kind of domain specific and not clear
enough, this change adds StatusBarManager#DisableInfo as a way to
describe which components an app has requested to be disabled.

It could also be used to remove the need for diasble() and disable2() in
the future.

Test: atest GtsStatusBarHostTestCases
Bug: 123430822
Change-Id: Iecd5119e01fbabf113b5cfbe8f02f8f0d990e9fb
2019-02-13 14:22:30 -05:00
Alex Kershaw
bc40490aeb Merge "Managed system update API council changes." 2019-02-13 12:47:22 +00:00
Remi NGUYEN VAN
f9a8c2e173 Remove deps from framework on netd interfaces
If included in framework.jar, the interfaces conflict with any app that
needs to depend on them, including the NetworkStack.

(cherry-pick of aosp/903220 with trivial conflict in Android.bp)

Bug: 124033493
Test: atest FrameworksNetTests NetworkStackTests
Change-Id: I0ecae20d514bf888f3a80331f19369ceb1c52aa3
2019-02-13 19:34:37 +09:00
vichang
eea3e9002a Merge "Include /apex/com.android.runtime for native library in app classloader" am: 9de24de618 am: 8c6c630bcf
am: 0865347dac

Change-Id: Ief054415f94a48aec923524ba34c6b8f546cb040
2019-02-12 20:22:21 -08:00
vichang
0865347dac Merge "Include /apex/com.android.runtime for native library in app classloader" am: 9de24de618
am: 8c6c630bcf

Change-Id: I8f8a014446f9d3079a4e78d2010bbd9b4e3f69af
2019-02-12 19:47:58 -08:00
Tim Van Patten
ddc4391170 ANGLE In Use Dialog Box
When ANGLE is enabled for an app, show a dialog box to the user to
indicate that ANGLE is in use.   This is useful because there are
not (or at least shouldn't be) any visual indication that a different
OpenGL driver is in use.

Bug: 120489005
Test: atest CtsAngleIntegrationHostTestCases
Test: Load an app with ANGLE enabled and verify dialog box is shown.
Test: Load an app without ANGLE and verify dialog box is not shown.
Change-Id: I5e87ec96582d43666cfcca2266b46ce98b859a32
2019-02-12 13:53:36 -07:00
TreeHugger Robot
f0d6f00bfd Merge "Use rethrowFromSystemServer instead of RuntimeException" 2019-02-12 19:35:41 +00:00
TreeHugger Robot
b70f4b5172 Merge "Device ID attestation for PO: Address API review" 2019-02-12 19:18:47 +00:00
TreeHugger Robot
afd14bfd44 Merge "Updated permission name according to API review" 2019-02-12 18:27:47 +00:00
Victor Chang
a366cc8c52 Include /apex/com.android.runtime for native library in app classloader
Bug: 123702996
Test: Manual test. After moving libicuuc.so into the apex path,
  call System.loadLibrary("icuuc") in test app
Test: CtsJniTestCases pass after moving libicuuc into apex and applied
CTS patch here. http://r.android.com/898053

Change-Id: Ic9049c1595b4ea029ec65649c3f3283672744569
2019-02-12 14:53:01 +00:00
Charles Chen
cfec91879f Use rethrowFromSystemServer instead of RuntimeException
Fixes: 123587667
Test: atest ActivityManagerMultiDisplayTests
Change-Id: Ie34462e28b3d14dbc058a115a3de046e6b42bcc1
2019-02-12 21:13:35 +08:00
TreeHugger Robot
947cfaaa16 Merge "Verify the pinned stack boundary when adjusting offset." 2019-02-12 09:21:36 +00:00
Tej Singh
77f8cfb4d3 Merge "Statsd Puller Callback Registration" 2019-02-12 04:11:07 +00:00
Mark Renouf
88f53c2378 Merge changes Ie79a67d3,Ifb548a30
* changes:
  Adds displayId to android.app.TaskInfo
  Fixes missing FLAG_ACTIVIY_NEW_TASK in startActivity
2019-02-12 03:33:22 +00:00
wilsonshih
5c4cf52a6b Verify the pinned stack boundary when adjusting offset.
When user touch home key and moved activity to pinned stack, Nexus
launcher also calls setShelfHeight to adjust pinned bounds, and then the
PinnedStackController sends the animation bounds to system ui to update
it to current bounds.
However, if system ui receives this bounds before system server process
configuration changes(such as rotation), the bounds sent to system ui will
become obsolete. Then system ui will call
ActivityTaskManager#resizeStack to overwrite the correct bounds with
the obsolete one.
In this case, what system ui want to do is adjust the PIP position with
an offset, so sending an offset is sufficient instead of sending a new
bounds to system server.

Fix: 122058651
Test: Manual test the pinned stack can be adjust with show/hide IME and shelf.
Test: atest ActivityManagerPinnedStackTests ActivityManagerAppConfigurationTests

Change-Id: I5e9271812c00b8e1d45af7a774b99b780102ad23
2019-02-12 11:02:47 +08:00
Tej Singh
a0c89dd5b6 Statsd Puller Callback Registration
Creates a hidden api to register puller callbacks for vendor atoms.

Test: manual local test
Test: statsd unit tests
Bug: 119898637
Change-Id: Id28817b8fc718e128adc4e1c6b2e997db84517f9
2019-02-11 14:24:03 -08:00
TreeHugger Robot
e3e704846f Merge "Allow registration of AppUsageLimitObservers with 0 time limit." 2019-02-11 20:28:52 +00:00
Winson
adc69673db Add transient night mode in car mode when targeting Q
To support Android Auto, make UiModeManager.setNightMode transient when the device is in car mode. The manager will update the current visible night mode, but will not persist the setting. When exiting car mode, night mode is restored from the previous persisted setting.

If the user explicitly toggles night mode from settings, it will flip the visible mode and persisted setting, ignoring the transient behavior. This is handled in ag/6191550.

Bug: 117346726

Test: manual test app
Test: atest UiModeManagerTest CTS test in ag/6190842

Change-Id: I795f9b64a4d00bd3ecf47787e11aeb9331a64643
2019-02-11 18:04:12 +00:00
Mark Renouf
b1abb5550d Adds displayId to android.app.TaskInfo
Bug: 124058588
Test: atest WmTests:TaskStackChangedListenerTest
Change-Id: Ie79a67d3f112be34cdb78fbdb70fd609fd92982a
2019-02-11 12:13:11 -05:00
Alex Kershaw
97d0e8f3e4 Managed system update API council changes.
Clarify the errorMessage Javadoc and rename InstallUpdateCallback.

Bug: 123697817
Test: Not applicable
Change-Id: I257b6353310e56bf1877a6f97bf1977ef5962af9
2019-02-11 16:28:10 +00:00
TreeHugger Robot
2148e7f009 Merge "Add default for music and gallery app." 2019-02-11 09:34:32 +00:00
TreeHugger Robot
9eb7476d6a Merge "KeyChain: Improve key override documentation." 2019-02-09 23:15:24 +00:00
TreeHugger Robot
2ba126cbc7 Merge "Fix javadoc for enabling backup in DevicePolicyManager" 2019-02-09 00:59:20 +00:00
Kevin Chyn
eb8c06d65d Merge "Rename setEnableFallback to setAllowDeviceCredential" 2019-02-09 00:37:44 +00:00
Hai Zhang
9ba3196af4 Add default for music and gallery app.
Also rearrange the order of the roles to be consistent.

Bug: 123994674
Test: manual
Change-Id: I2e51ad02925bb7032e9575a024ec50b6715a3428
2019-02-08 15:04:50 -08:00
Varun Shah
54f7f7f903 Allow registration of AppUsageLimitObservers with 0 time limit.
A wellbeing app can now register AppUsageLimit observers with a time
limit of 0 seconds. There will be no callback intent fired in this case.

Bug: 123899673
Test: atest FrameworksServicesTests:AppTimeLimitControllerTests#testAppUsageLimitObserver_ZeroTimeLimitIsAllowed
Test: atest android.content.pm.cts.LauncherAppsTest#testGetAppUsageLimit_allowsZeroLimit
Change-Id: I9cdff21bcfa72f202699cea288e703f35a4f158f
2019-02-08 11:42:45 -08:00
Kevin Chyn
45d1f9d311 Rename setEnableFallback to setAllowDeviceCredential
Also adds BIOMETRIC_ERROR_NO_DEVICE_CREDENTIAL constant

Fixes: 123725101

Test: Demo app
Test: CtsVerifier Biometric Test
Change-Id: Ib4d25438946c0ce476de8ef416d07e3c58152da9
2019-02-08 11:34:42 -08:00
Lucas Dupin
89b34b88d2 Merge "Fixes an issue with decorated custom view styles" 2019-02-08 16:36:36 +00:00
Bernard Chau
09121906be Updated permission name according to API review
Fix: 123661671
Test: N/A
Change-Id: I4520532deee054e1fe650fbeee10a6088d20a677
2019-02-08 15:57:14 +00:00
Eran Messeri
ac70aabed7 Device ID attestation for PO: Address API review
Add a RequiresPermission annotation to the method for granting Profile
Owner access to Device ID attestation, as advised by the API council.

Bug: 123698391
Bug: 111335970
Test: That it compiles
Change-Id: Iccb217a0d5f557d2f9355e338bddbe918ae1a060
2019-02-08 15:22:08 +00:00
Stefano
508db9d003 Fix javadoc for enabling backup in DevicePolicyManager
Test: only changing javadoc.
Bug: 121198006
Change-Id: I157804343dd2d74c868ef696f0c5b26b394110c3
2019-02-08 13:50:28 +00:00
Issei Suzuki
a5dbf52d0a Set insets on the virtual display to avoid IME covering the bubble.
Bug: 123544535
Test: Manual test using the test app, and atest DisplayPolicyLayoutTests
Change-Id: If2fceea97f4d702d000d887883c7f131337e9fd0
2019-02-08 14:21:53 +01:00