Commit Graph

13190 Commits

Author SHA1 Message Date
Jason Monk
e2a04b3ea4 List<SliceSpec> -> Set<SliceSpec>
Test: update-api
Bug: 73123786
Change-Id: Ia618a35fbe81d2aeb5f58d58add0a14069f21bed
2018-04-10 19:23:34 +00:00
Julia Reynolds
9aa1c9e925 Add link to onboarding screen
Test: runtest systemui-notification
Bug: 77658931
Change-Id: I70210b5d5e0de27ff38a6b2f5d8201266b6ec4d6
2018-04-10 08:47:07 -04:00
TreeHugger Robot
6a66f4e8cf Merge "Helper methods for settings screen" into pi-dev 2018-04-09 18:52:25 +00:00
TreeHugger Robot
d565f04957 Merge "Expose TestAPIs needed by GtsOsTestCases" into pi-dev 2018-04-09 15:57:42 +00:00
TreeHugger Robot
6f34a9b2d3 Merge "NO PARTIAL RERUN: Do not return recycled bitmaps" into pi-dev 2018-04-09 14:32:41 +00:00
TreeHugger Robot
fdef00a5ae Merge "Update Javadoc of setLockTaskEnabled to reflect known issue" into pi-dev 2018-04-09 13:39:31 +00:00
Julia Reynolds
47f4280b4f Helper methods for settings screen
Bug: 77657376
Test: make -j RunSettingsRoboTests
Change-Id: I2002cf98f26312e074c40c085044c60f7ce52ff7
2018-04-09 08:47:39 -04:00
Eric Sandness
5ab98de315 Permission Check For DPM.getPermittedAccessibilityServices
Require the callers of DPM.getPermittedAccessibilityServices(userId) to
hold the MANAGE_USERS permission.  The only known callers of this API
are settings apps that already hold this permission.

Bug: 62343414
Test: com.android.server.devicepolicy.DevicePolicyManagerTest
Test: com.google.android.gts.devicepolicy.DeviceOwnerTest
Test: Manually checked accessibility settings in DO and PO modes
Change-Id: I8ee3f876fcaffa63636645f0f59709cd147254ef
2018-04-09 07:47:13 +00:00
Lucas Dupin
61df45cd18 NO PARTIAL RERUN: Do not return recycled bitmaps
There's also no need to offload WallpaperManager#forgetLoadedBitmap
because Bitmap#recycle is asynchronous - and the whole method is
synchronized.

Fixes 77597550
Test: atest cts/tests/framework/base/activitymanager/src/android/server/am/ActivityManagerMultiDisplayTests.java

Change-Id: I88014e21bd05e10c2f524393bb637596708e4e63
2018-04-08 18:45:59 +00:00
Jan Althaus
739199f3e9 Merge "Fixing incomplete RemoteAction clone" into pi-dev 2018-04-07 08:16:28 +00:00
Lorenzo Colitti
2eae1e3a45 Merge changes from topic "unwanted" into pi-dev
* changes:
  Add @param tag for state in queryDetailsForUidTagState.
  Remove unwanted capability code per API council feedback.
2018-04-07 02:41:40 +00:00
TreeHugger Robot
66b90a035f Merge "Added nullability annotations to API" into pi-dev 2018-04-06 22:06:04 +00:00
Philip P. Moltmann
f80809ffd7 Expose TestAPIs needed by GtsOsTestCases
Test: atest GtsOsTestCases on pi-dev:taimen and oc-mr1:sailfish
Bug: 77497338
Change-Id: I5de976991a857bfbed2faa943822af542601fa8b
2018-04-06 14:59:07 -07:00
Selim Cinek
eb53c228f0 Added nullability annotations to API
Certain methods where left out in the new APIs

Change-Id: Ide1e2f387a4918f2134254d862eeff06bfd3a730
Fixes: 74409592
Test: only non-semantic changes
2018-04-06 13:39:59 -07:00
Fyodor Kupolov
28faced973 Merge "Added dontSendToRestrictedApps broadcast option" into pi-dev 2018-04-06 17:57:10 +00:00
Selim Cinek
cecec7bf5b Merge "Migrated the Person class to its own file" into pi-dev 2018-04-06 15:59:34 +00:00
Lorenzo Colitti
53765e00d8 Add @param tag for state in queryDetailsForUidTagState.
Change-Id: I22de424ccb2b30b2a56edd17dc982565b8aa7d4a
Fix: 77518425
Test: make doc-comment-check-docs
2018-04-06 23:17:23 +09:00
Rubin Xu
892ebd0285 Merge "Tweak SystemUpdatePolicy APIs" into pi-dev 2018-04-06 12:54:24 +00:00
Selim Cinek
9acd673c0d Migrated the Person class to its own file
Because we are expecting usage of Person across
other surfaces, we migrate the class out
of he Notification class which is already incredibly
huge.

Test: Migrated existing cts test
Change-Id: Ia487ae7965b5ca2b016245d21faa63e3b4628344
Fixes: 75980526
2018-04-05 17:21:11 -07:00
TreeHugger Robot
d7c3ba204c Merge "Ensured that the reply icon isn't showing on HUNS" into pi-dev 2018-04-05 23:57:11 +00:00
TreeHugger Robot
822ce4f3aa Merge "Activity interceptor dialog for suspended apps" into pi-dev 2018-04-05 21:15:19 +00:00
Jan Althaus
ab78047aa2 Fixing incomplete RemoteAction clone
Bug: 77631078
Test: atest CtsAndroidAppTestCases:android.app.cts.RemoteActionTest
Change-Id: Ifd6617baf67993141e2ee85def8fb84c88cbe3e7
2018-04-05 21:22:51 +02:00
TreeHugger Robot
bd2e790946 Merge "Reduce log spam in TimeSparseArray" into pi-dev 2018-04-05 18:01:52 +00:00
Rubin Xu
1b2f374018 Tweak SystemUpdatePolicy APIs
* Introduce a FreezePeriod class that represents a single freeze period
  and is defined by two MonthDay instances.
* Add ERROR_UNKNOWN to ValidationFailedException
* Make SystemUpdatePolicy final
* Document SystemUpdatePolicy.InstallationOption and add IntDef to getType()

Test: runtest frameworks-services -c com.android.server.devicepolicy.SystemUpdatePolicyTest
Test: cts-tradefed run cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.DeviceOwnerTest#testSystemUpdatePolicy
Test: gts-tradefed run gts-dev --module GtsGmscoreHostTestCases --test com.google.android.gts.devicepolicy.DeviceOwnerTest#testSystemUpdatePolicy
Bug: 74976911
Change-Id: I85cf636c3a98c97bd03b7b296c3130028051a791
2018-04-05 14:26:52 +01:00
Benjamin Franz
11f058225f Update Javadoc of setLockTaskEnabled to reflect known issue
Document the known issue that setLockTaskEnabled does not take effect if
the activity is already in the foreground or running in the background.

Bug: 72806000
Test: make docs
Change-Id: I2b571cee553dbc8a11147ebe4d444e5f69ce96b2
2018-04-05 12:36:31 +00:00
Rubin Xu
73961397e5 Merge "Device ID attestation: Add feature flag." into pi-dev 2018-04-05 09:38:28 +00:00
Suprabh Shukla
3c3af1406e Activity interceptor dialog for suspended apps
Added an AlertActivity to intercept the start for an activity belonging
to a suspended app. More details will be shown if the suspending app
also defines an activity to handle the API action
SHOW_SUSPENDED_APP_DETAILS.

Test: Added tests to existing classes. Can be run via:
atest com.android.server.pm.SuspendPackagesTest
atest com.android.server.pm.PackageManagerSettingsTests
atest com.android.server.pm.PackageUserStateTest

Bug: 75332201
Change-Id: I85dc4e9efd15eedba306ed5b856f651e3abd3e99
2018-04-04 18:40:19 -07:00
Fyodor Kupolov
da26eb3382 Added dontSendToRestrictedApps broadcast option
Sets whether pending intent can be sent for an application with
background restrictions

Test: manual
Bug: 77237719
Change-Id: I9acc2471f1dbd657ed9a6dd93888e04a6ae48d61
2018-04-04 16:39:24 -07:00
Daniel Cardenas
8664e95613 Reduce log spam in TimeSparseArray
Change-Id: I8574f9e84be4e27be3946ed361475691d6ea03e0
Fixes: 77587733
Test: Build, excersize elfin device, monitor for logspam
2018-04-04 14:14:34 -07:00
Makoto Onuki
d67070e1c1 Simplify service wrapper initialization + make robust
- Simplify the logic, no more AtomicIntegers.
- Make robust -- if we know we've successfully created an instance before,
but the instance is now gone, re-initialize again.
- Added CTS.

Bug: 75964116
Fixes: 75964116
Bug: 71882178
Fixes: 71882178
Test: Manual test with UC Browser
Test: atest /android/pi-dev/cts/tests/tests/content/src/android/content/cts/ContextTest.java#testGetSystemService_multiThreaded
Change-Id: I12a9834d0f62e90e6f5d806a124cbdade415440c
2018-04-04 12:16:35 -07:00
Tony Mak
706fbe7ed3 We should show custom title for suspend app dialog
BUG: 77523074

Test: Suspend an app, observe the new title.

Change-Id: I85f3d47e05332f7593a885130fd30dc5fd0a9960
2018-04-04 10:38:12 +00:00
TreeHugger Robot
7694926d37 Merge "[DO NOT MERGE] Sort A11yService#getWindows by layer descending" into pi-dev 2018-04-03 23:17:26 +00:00
TreeHugger Robot
5fa07c0986 Merge changes from topic "fw_quickstep_update" into pi-dev
* changes:
  Reparent recents animation task leash to app animation layer
  Allow recents animation to override divider minimized state
  Prevent unnecessary reordering of the home stack
2018-04-03 22:31:57 +00:00
TreeHugger Robot
7065aedba0 Merge "Add method to get blocked channel counts" into pi-dev 2018-04-03 22:22:24 +00:00
Eugene Susla
bd573236f8 [DO NOT MERGE] Sort A11yService#getWindows by layer descending
This is what A11yService#getWindows promises in the javadoc.

Fixes: 71581072
Test: using testback ensure the order is correct
Change-Id: I5038c4de29c60e235b65751f7bd7771ef35eb339
(cherry picked from commit f40da1a884)
2018-04-03 21:36:01 +00:00
Nathan Harold
592dadbd43 Add AppOps Checks for MANAGE_IPSEC_TUNNELS
Adds support for a new AppOp to permit services to
use IpSec tunnel mode. The IpSecService now needs
a context so change the service mode to a cached
service rather than a static service.

Bug: 66955045
Test: runtest frameworks-net
Change-Id: I17a4a286225b432c3e15ea1587d946189931b4f4
2018-04-03 18:23:11 +00:00
Julia Reynolds
f2e499d7b5 Add method to get blocked channel counts
Test: runtest systemui-notification
Bug: 72442731
Change-Id: I9ff30003edd0325f0ee0ad7154962c38523f9218
2018-04-03 09:32:15 -04:00
Lorenzo Colitti
3cafea0701 Merge "Allow applications to query for foreground/background data usage." into pi-dev 2018-04-02 22:20:03 +00:00
Dianne Hackborn
886fc6aef0 Merge "Work on issue #74404949: Screen state usage API" into pi-dev 2018-04-02 20:48:51 +00:00
TreeHugger Robot
3f6b7714a7 Merge "Don't use a copy of window params when showing a dialog." into pi-dev 2018-04-02 19:22:58 +00:00
Andrii Kulian
38af02e75b Merge "Don't finish activity on duplicate resume request" into pi-dev 2018-04-02 17:58:42 +00:00
Felipe Leme
15d403dd6a Don't use a copy of window params when showing a dialog.
When a Dialog's show() method is called, it makes a copy (l) of its window param
and change the copy's softInputMode before calling wm.addView(). This call ends
up calling WindowManagerGlobal.addView(view, l, display, parentWindow),
which in turn sets the application token from the parentWindow into l and stores
l on its mParams map.

Later, when the dialog layout is changed (for example, if it's resized), the
original params ends up passed to WindowManagerGlobal.updateViewLayout(),
which in turn updates it's internal mParams with it, hence losing the
application token (as the token was set in the copy).

Then, when Autofill (and possibly Assist) is triggered to that activity, the
Dialog's view hierarchy is ignored because WindowManagerGlobal.getRootViews()
ignores views whose params do not have an application token.

This CL fixes this issue by passing the original dialog's param to the wm
method and resetting the softInputMode that was changed, rather than making a
copy.

Test: atest DialogLauncherActivityTest
Test: manual verification with Twitch

Fixes: 68816440

Change-Id: I55f510ab7a44030bc368221b7db1a221bc2e09c8
2018-04-02 10:07:40 -07:00
Lorenzo Colitti
84b317cecf Allow applications to query for foreground/background data usage.
Currently the NetworkStatsManager APIs allow applications to
query for their own data usage by UID and tag, but do not allow
applications to query by foreground/background state.

This is causing popular apps to resort to parsing xt_qtaguid
stats files directly. Because this is no longer allowed for apps
targeting P and above, provide replacement functionality.

This API allows apps to query for data usage for a given state,
but not to receive data usage broken down by state. This is
consistent with how the current UID and tag APIs work. It is also
not an undue burden on apps: there are currently only two states
of interest (FOREGROUND and everything else), and even if we add
states in the future, unmodified apps can still obtain total
traffic using STATE_ALL.

Bug: 72977484
Test: New CTS test added in other change in this topic.
Change-Id: Ic8c9194569ffd599b49e4a8197c5c2ea0ec3f7f7
2018-04-02 19:58:24 +09:00
Dianne Hackborn
21306849e6 Merge "Fix issue #77230164: Add app op to control foreground services" into pi-dev 2018-04-01 22:26:18 +00:00
TreeHugger Robot
703f31db63 Merge "Add subtype for layout direction to Slice" into pi-dev 2018-03-31 04:16:35 +00:00
Dianne Hackborn
3378aa9f88 Work on issue #74404949: Screen state usage API
Add events for the keyguard being shown and hidden.

Bug: 74404949
Test: atest CtsUsageStatsTestCases:UsageStatsTest\#testInteractiveEvents
Change-Id: I038e03cf4ba80669d7d17c3d66b98ee81050abc8
2018-03-30 17:43:49 -07:00
TreeHugger Robot
35201a6af2 Merge "Add some methods to manage slice permissios" into pi-dev 2018-03-31 00:26:06 +00:00
Mady Mellor
209af08eca Add subtype for layout direction to Slice
Test: make
Bug: 73123366
Change-Id: I1446dadd8a50e7682d640aa55a7d4a20faf52416
2018-03-30 14:24:13 -07:00
Dianne Hackborn
e9d9b4b9a2 Fix issue #77230164: Add app op to control foreground services
New app op added.

Bug: 77230164
Test: atest CtsAppTestCases:ActivityManagerProcessStateTest\#testForegroundServiceAppOp
Change-Id: I59f2f03850da4b9f5550e82ba28f175e4779e783
2018-03-30 13:10:54 -07:00
TreeHugger Robot
4ced90cb12 Merge "Add auto-grant permission slice API" into pi-dev 2018-03-30 18:45:00 +00:00