Commit Graph

15003 Commits

Author SHA1 Message Date
Mark Renouf
49df009529 Merge "Forward StatusBar.onBackPressed to Bubbles when expanded" 2019-02-19 18:33:38 +00:00
Tiger Huang
03c20bbf6e Merge "Remove InputForwarder" 2019-02-19 07:18:41 +00:00
Mark Renouf
041d72697a Forward StatusBar.onBackPressed to Bubbles when expanded
StatusBarWindowView is the root of the StatusBar window
and handles all key events at dispatchKeyEvent

All keys dispatched to the StatusBar window flow through
StatusBarWindowView#dispatchKeyEvent. A BACK key event
is forwarded to StatusBar.onBackPressed()

If StatusBar#canPanelBeCollapsed() is false, the action is
passed to BubbleController which forwards to the expanded
bubble by calling to ActivityView#performBackPress().

Bug: 123631742
Test: manual, go/bubbles-app
Change-Id: I0ccafc02f876c973ebc267055162621109b2dcc0
2019-02-18 18:36:09 +00:00
Mark Renouf
d60890b484 Merge "ActivityView: avoid crash in release() when detached from window" 2019-02-18 16:09:19 +00:00
TreeHugger Robot
1869313a88 Merge "Trigger CtsDevicePolicyManagerTestCases in postsubmit" 2019-02-18 16:02:35 +00:00
Svetoslav Ganov
bdea76f9ae Merge "Add request object for querying historical ops" 2019-02-18 15:48:19 +00:00
Pavel Grafov
5af5841b05 Trigger CtsDevicePolicyManagerTestCases in postsubmit
In this configuration the tests will only be triggered by changes
to services/devicepolicy/** and core/java/android/app/admin/**, so
we won't be able to catch breakages coming from the rest of the tree
with a single CL precision. But let's see which parts are causing
the most breakages and add them later.

Bug: 124653467
Test: atest --test-mapping core/java/android/app/admin:postsubmit
Test: atest --test-mapping services/devicepolicy:postsubmit
Change-Id: I58f87fff4b5b5e3e4fb8a333dd6ac4dd4100b587
2019-02-18 14:12:00 +00:00
Tiger Huang
c0240753f0 Remove InputForwarder
InputForwarder was used by ActivityView. InputForwarder is not used by
anyone now.

Bug: 120675821
Test: Manual test with ActivityViewTest
Test: atest CtsActivityManagerDeviceTestCases:ActivityViewTest
Change-Id: I6bd2338c921e6dfb1dfe357decb878d558df8bfd
2019-02-18 20:02:18 +08:00
Svet Ganov
23c88db8f4 Add request object for querying historical ops
Test: atest CtsAppOpTestCases

bug:123253745

Change-Id: Ia473f9298a83214f2fdfb1062992b48357965003
2019-02-17 07:35:52 -08:00
Michal Karpinski
c99d718c57 Deliver realCallingUid and realCallingPid to
AMS.broadcastIntentLocked() and make permission checks on them

Due to cleared identity at calling sites, we were using wrong
identity to carry out permission checks for BroadcastOptions.

Test: manual (log uids/pids with logcat, and see they're correct)
Bug: 124539196
Change-Id: Ieabb14220cadd25f4ed5fbc3b0ac028fc53d47de
2019-02-17 15:23:35 +00:00
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
Mark Renouf
3856b4f2cd ActivityView: avoid crash in release() when detached from window
Adds an isAttachedToWindow() check to updateLocation() and
cleanTapExcludeRegion() which both require a reference to a Window.

Bug: 112574121
Change-Id: I71f184d74eb88d79effaeb3340ce5362155ed0fb
2019-02-14 16:53:03 -05: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