Commit Graph

12331 Commits

Author SHA1 Message Date
Andrew Scull
9dcb7cade9 DPMS: expose password blacklist API for SDK
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testPasswordBlacklist
Test: cts-tradefed run cts -m CtsAdminTestCases -t android.admin.cts.DevicePolicyManagerTest

Bug: 63578054
Change-Id: Ide58673ab22dcb4454a67300e8aa23b5fe343e3d
2017-12-20 13:56:15 +00:00
TreeHugger Robot
a82824272c Merge "DPM: Implement installing certificates for generated keys" 2017-12-20 08:43:56 +00:00
TreeHugger Robot
6348ddcd04 Merge "Make TOP_SLEEPING procstate more like a cached process." 2017-12-19 18:47:19 +00:00
Andrew Scull
f7ca81fbc9 Merge "DPMS: password blacklist" 2017-12-19 18:01:56 +00:00
Esteban Talavera
e51ffaa6ac Merge "Fix usagestats DUMP OF SERVICE" 2017-12-19 17:46:06 +00:00
Esteban Talavera
838ea24493 Fix usagestats DUMP OF SERVICE
DUMP OF SERVICE Usagestats was empty in bugreports
because an unexpected -a argument was being passed.
adb shell pm dump <package> had a similar issue with --packages

Change-Id: Ic67c723b8edc74ec7c9c48582b08896ca3430a4a
Fix: 70777338
Test: adb shell pm dump <package> and bugreports now contain usage stats
2017-12-19 15:23:43 +00:00
TreeHugger Robot
60a3c1e313 Merge "incidentd: Dumping java process meminfo data." 2017-12-19 01:07:49 +00:00
Dianne Hackborn
bad8d91056 Make TOP_SLEEPING procstate more like a cached process.
When an app is on the top of the activity stack but the screen
is not on, this doesn't really count as a top app in the normal
sense.  In particular, we'd really like to apply the normal
restrictions we have on background and cached apps: no network
access, no ability to use wake locks, etc.  (In other words, in
this state the app's activity is stopped, so from its perspective
it is no different than the user leaving it to go to another app.)

To do this, we change the order of the TOP_SLEEPING proc state
out from the range of foreground states down to between the
cached and background states.

Test: ActivityManagerProcessStateTest
Bug: 70808931
Change-Id: I994caba8c27553a452de75efa358be0e683d046f
2017-12-18 17:05:52 -08:00
TreeHugger Robot
4316d8ecde Merge "Move heavy-weight process state down to cached range." 2017-12-19 00:29:31 +00:00
TreeHugger Robot
84a41d6684 Merge changes from topic "aod_wallpapers"
* changes:
  Hide AoD wallpaper after 1min
  Support wallpapers in AoD
2017-12-19 00:18:49 +00:00
Kweku Adams
983829fec5 incidentd: Dumping java process meminfo data.
Bug: 65750823
Test: flash device and check incident.proto output
Change-Id: I9b10daddf0580b3fab4ed7970fb838a605eef0e6
2017-12-18 15:19:13 -08:00
Dianne Hackborn
f097d42f0c Move heavy-weight process state down to cached range.
This allows us to generally treat heavy-weight processes in
the background as cached processes, applying all of the limitations
we want for such things -- disable wake locks, etc.

Test: run-am-test ActivityManagerProcessStateTest
Bug: 63937884
Change-Id: I7c140c8f48188f6aa9c09731e83e3db4e4405e77
2017-12-18 14:54:08 -08:00
TreeHugger Robot
c5f607cee9 Merge "Make isUsingUnifiedPassword throw when used on parent instance" 2017-12-18 21:26:32 +00:00
Lucas Dupin
7517b5dcce Support wallpapers in AoD
Such wallpaper has to define supportsAmbientMode,
and set it to true on its android.service.wallpaper
meta data.

Also introduces WallpaperService.Engine#onAmbientModeChanged
to notify a live wallpaper that the display state has changed.

Change-Id: I49e846069a698b3cc3bb6e7cda98172920eaae4c
Bug: 64155983
Test: runtest -x frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/DozeWallpaperStateTest.java
Test: runtest -x frameworks/base/tests/Internal/src/android/app/WallpaperInfoTest.java
Test: runtest -x frameworks/base/tests/Internal/src/android/service/wallpaper/WallpaperServiceTest.java
Test: set AoD wallpaper, go to aod, lock screen, launcher
Test: set regular wallpaper, go to aod, lock screen, launcher
2017-12-18 11:28:16 -08:00
Pavel Grafov
3b27ed07fe Make isUsingUnifiedPassword throw when used on parent instance
It doesn't make sense to call it via parent instance.

Bug: 70788883
Test: cts-tradefed run cts -m DevicePolicyManager -t com.android.cts.devicepolicy.ManagedProfileTest#testParentProfileApiDisabled
Change-Id: I66334757ca8e9ee2525dbe88c83216563837aee6
2017-12-18 18:29:51 +00:00
Alexandru-Andrei Rotaru
7f31bb0478 DPMS: password blacklist
Allows admins to blacklist passwords so they cannot be enrolled by the
user or the admin.

Test: bit FrameworksServicesTests:com.android.server.devicepolicy.PasswordBlacklistTest
Test: bit FrameworksServicesTests:com.android.server.devicepolicy.DevicePolicyManagerTest
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testPasswordBlacklist
Test: cts-tradefed run cts -m CtsAdminTestCases -t android.admin.cts.DevicePolicyManagerTest

Bug: 63578054
Change-Id: I8949ac929c760b66dc719cb058a9f88dc9cad727
2017-12-18 17:05:18 +00:00
Eran Messeri
ecf0f22e58 DPM: Implement installing certificates for generated keys
Add a new method in the DevicePolicyManager to associate certificates (and
set the user-visibility) with a given key alias.
Conceptually, the new method, setKeyPairCertificate is very similar to
installKeyPair, except it does not install a key, only certificates.

(The new setKeyPairCertificate, together with generateKeyPair is
functionally equivalent to installKeyPair, except the keys are generated
in hardware rather than supplied externally).

Bug: 63388672
Test: cts-tradefed run commandAndExit cts-dev -a armeabi-v7a -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.DeviceOwnerTest#testKeyManagement -l DEBUG
Change-Id: Idbfe151f6e5311766decbc1a010bff78dc60249f
2017-12-18 13:26:01 +00:00
Sudheer Shanka
b430d8ff06 Merge "Start processes asynchronously in AMS." 2017-12-16 18:36:48 +00:00
TreeHugger Robot
ffed5c82ca Merge "Revert "Log an App Op when an accessibility action is performed."" 2017-12-16 11:57:25 +00:00
Jeff Sharkey
23733285c6 Merge "Delay touching disks when secure keyguard showing." 2017-12-16 02:20:32 +00:00
Phil Weaver
e8fb83fd62 Revert "Log an App Op when an accessibility action is performed."
CTS tests are now throwing security exceptions for accessibility actions.

This reverts commit 19eb58959b.

Change-Id: I2027ee4cca0fcc2b38bb615a58d992ef309e2d70
2017-12-16 00:55:51 +00:00
TreeHugger Robot
73617b0cc0 Merge "Add hints for toggles in Slice" 2017-12-16 00:00:26 +00:00
susanta.patra
0da6e2ccf8 Merge "Fixed create app shortcut text and icon alignment in RTL Language" am: 29f61c21f4 am: c1a2cd2175
am: acbb9830c1

Change-Id: I3aa27e3e6d744a27ff4ee2ad9f1de7fc181f4c38
2017-12-15 22:24:46 +00:00
susanta.patra
acbb9830c1 Merge "Fixed create app shortcut text and icon alignment in RTL Language" am: 29f61c21f4
am: c1a2cd2175

Change-Id: Id0fc2be3255620089a632236af2997213a9d6003
2017-12-15 22:16:02 +00:00
Treehugger Robot
29f61c21f4 Merge "Fixed create app shortcut text and icon alignment in RTL Language" 2017-12-15 21:58:07 +00:00
Jeff Sharkey
9765e446d3 Delay touching disks when secure keyguard showing.
We've tried our best to protect against malicious storage devices
with limited SELinux domains, but let's be even more paranoid and
refuse to look at disks inserted while a secure keyguard is
showing.  We'll gladly scan them right away once the user confirms
their credentials.

Test: builds, boots, manual testing
Bug: 68054513
Change-Id: I19b7446e855176921ed477ef6d07bc9a2cc0ef9a
2017-12-15 13:44:59 -07:00
Sudheer Shanka
f6690100be Start processes asynchronously in AMS.
Currently, process start is initiated in ActivityManagerService
holding the main lock and this takes ~40ms to complete. As seen
in some of the issues in previous releases, this is one of the
contributors of the lock contention in system_server. This change
tries to address this issue by moving the process start outside
the locked section.

When a process start is required, instead of doing it synchronously,
this request will be posted on a handler thread. On the handler thread,
this process start request will be completed without holding a lock.
If for some reason, we decide the process is not needed anymore before
it is actually started or being started, then AMS does everything as
usual removing the references to the process from internal state except
actually killing the process which will be handled on the handler
thread.

Bug: 68775202
Test: Ran app startup perf tests using forrest, will update the bug with results.
Test: https://docs.google.com/spreadsheets/d/1cW81guRALZXKsN-WZsKyQiCSY-RgkJ2m_M9IfqIquz8
Test: cts-tradefed run singleCommand cts-dev -m CtsActivityManagerDeviceTestCases
Test: cts-tradefed run singleCommand cts-dev -m CtsWindowManagerDeviceTestCases
Test: cts-tradefed run singleCommand cts-dev -m CtsAppTestCases
Test: cts-tradefed run singleCommand cts-dev -m CtsMultiUserHostTestCases
Test: adb shell am instrument -e package com.android.server.am -w \
      com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Test: adb shell am instrument -e class com.android.server.pm.UserManagerTest -w \
      com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Test: adb shell am instrument -e package android.content -w \
      com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Test: cts-tradefed run singleCommand cts-dev -m CtsProviderTestCases
Test: cts-tradefed run singleCommand cts-dev -m CtsContentTestCases -t \
      android.content.cts.ContentResolverTest
Test: cts-tradefed run singleCommand cts-dev -m CtsContentTestCases -t \
      android.content.cts.ContentProviderTest
Test: cts-tradefed run singleCommand cts-dev -m CtsWebkitTestCases
Test: cts-tradefed run singleCommand cts-dev -m CtsHostsideWebViewTests
Test: cts-tradefed run singleCommand cts-dev -m CtsAssistTestCases
Test: make WebViewLoadingTests && make tradefed-all && tradefed.sh \
      run template/local_min --template:map test=WebViewLoadingTests
Test: adb shell setprop wrap.com.google.android.apps.maps \
      '"LIBC_DEBUG_MALLOC_OPTIONS=backtrace logwrapper"'
      && adb shell dumpsys meminfo --unreachable <PID_OF_APP>
      && check ppid of <APP> is logwrapper's pid.
Test: cts-tradefed run singleCommand cts-dev -m CtsWrapWrapNoDebugTestCases
Test: cts-tradefed run singleCommand cts-dev -m CtsWrapWrapDebugTestCases
Test: cts-tradefed run singleCommand cts-dev -m CtsWrapNoWrapTestCases
Test: cts-tradefed run singleCommand cts-dev -m CtsWrapWrapDebugMallocDebugTestCases
Test: manual

Change-Id: I1fe7ce48cd5a4aadccaf6b3d6fdb5cad3304f1d3
2017-12-15 12:23:12 -08:00
Jason Monk
1d521a54bf Merge "Add APIs for slice pinning" 2017-12-15 19:49:02 +00:00
Jeff Hamilton
50a716b03e Merge "Minor LoadedApk refactoring." 2017-12-15 17:53:03 +00:00
Peter Visontay
f5ba933e9c Merge "Log an App Op when an accessibility action is performed." 2017-12-15 15:58:12 +00:00
Pavel Grafov
d1319bb059 Merge "Introduce DISALLOW_UNIFIED_PASSWORD." 2017-12-15 13:47:55 +00:00
Peter Visontay
19eb58959b Log an App Op when an accessibility action is performed.
Bug: 63907873
Test: manually tested that the app op is being logged for TalkBack and a 3rd party accessibility service. Ran UIAutomator-based tests to check that they work as expected.
Change-Id: I1a40d4ead52ba2258cc7ddc8be594a13895d8340
2017-12-15 12:05:32 +00:00
Peter Visontay
47197c8870 Merge "Log when an app shows a UI overlay." 2017-12-15 11:20:38 +00:00
Mady Mellor
414ad18358 Merge "Adds hint summary to slice" 2017-12-14 21:48:59 +00:00
Jason Monk
e2c645179f Add APIs for slice pinning
These APIs allow apps to know when they should be sending updates
to any given slice uri.

Test: update-api
Bug: 68378571
Change-Id: I4fa218c8d376692fa843f21777c87d592169a377
2017-12-14 16:02:23 -05:00
Pavel Grafov
c4f87e9ceb Introduce DISALLOW_UNIFIED_PASSWORD.
When DISALLOW_UNIFIED_PASSWORD is enforced by managed profile
owner, the user is disallowed to user single lock for both primary
user and the profile.

DMP.isUsingUnifiedPassword() can be called by DPC to check if
this restriction is obeyed.

Test: make cts-verifier
Test: cts-tradefed run cts -m CtsDevicePolicyManagerTestCases -t
  com.android.cts.devicepolicy.ManagedProfileTest#testIsUsingUnifiedPassword
Test: cts-tradefed run cts -m CtsAdminTestCases -t
  android.admin.cts.DevicePolicyManagerTest#testIsUsingUnifiedPassword_failIfNotProfileOwner
Bug: 63909482
Change-Id: Ib758e32d4bf4012d805185bce874f481e17576ba
2017-12-14 20:53:27 +00:00
Peter Visontay
96449f61e6 Log when an app shows a UI overlay.
Bug: 63907873
Test: manually checked that the op is logged when an app shows an overlay.
Change-Id: I932a394a6d829a6a48d17e9d8c00e3e66623bd43
2017-12-14 18:28:17 +00:00
Eran Messeri
a173064047 DevicePolicyManager: Support attestation for generated keys.
If the KeyGenParameterSpec passed into
DevicePolicyManager.generateKeyPair contains an attestation challenge,
request an attestation record for the newly-generated key with the
challenge provided.

This particular implementation was chosen, rather than letting the
attestation record be generated at the same time as key generation, to
avoid having the attestation chain stored in Keystore and associated
with the generated alias.

The rationale is that this is a key that is potentially accessible by
multiple applications and the attestation chain may end up being sent
as a TLS client certificate chain, for example.

As the attestation challenge should be unique per device, to avoid
the potential of sending / sharing unique device information, by
explicitly requesting an attestation record after key generation, the
attestation record is only returned to the generateKeyPair client and
not persistend in Keystore.

Bug: 63388672
Test: New CTS test to be run with: 'cts-tradefed run commandAndExit cts-dev -a armeabi-v7a -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.DeviceOwnerTest#testKeyManagement -l DEBUG'
Change-Id: I95a9aef179173b571b533301ac438c675e8fe702
2017-12-14 18:09:05 +00:00
Antoan Angelov
ce0fe9b674 Merge "Add profile owner transfer functionality." 2017-12-14 15:09:05 +00:00
Peter Visontay
5607d0b72b Merge "Log an App Op when an accessibility service is registered." 2017-12-14 15:07:58 +00:00
Jeff Hamilton
7541ca4d1a Minor LoadedApk refactoring.
- Rename varaibles holding LoadedApk to make the code easier to read.
- Move resource creation into LoadedApk, consolidating the logic.

Test: manual
Change-Id: I6bdc70482fbbb346ff694ada528ded18d3a63ef7
2017-12-14 10:02:37 -05:00
arangelov
08841efcdf Add profile owner transfer functionality.
Test: cts-tradefed run cts-dev --module DevicePolicyManager --test com.android.cts.devicepolicy.TransferProfileOwnerTest
Test: bit FrameworksServicesTests:com.android.server.devicepolicy.DevicePolicyManagerTest
Bug: 69542817

Change-Id: I824fcb334e0ca3157fb67920f7583b309a14bf85
2017-12-14 11:46:47 +00:00
TreeHugger Robot
895d73105b Merge "Add more IntDef prefixes for auto-documenting." 2017-12-14 07:17:52 +00:00
Joe Onorato
c9f1a9e3dd Merge "Fix how we build the statsd protos." 2017-12-14 05:33:33 +00:00
TreeHugger Robot
4b1557d3a0 Merge "Give SliceManagerService a concept of pinned slices." 2017-12-14 04:09:55 +00:00
Jeff Sharkey
ce8db99114 Add more IntDef prefixes for auto-documenting.
Test: builds, boots
Bug: 70177949
Exempt-From-Owner-Approval: annotation-only changes
Change-Id: I76dde6054e06f52240bd4b1a0f196dcb74623608
2017-12-13 20:05:36 -07:00
Joe Onorato
62c220b20b Fix how we build the statsd protos.
This lets us include frameworks protos, and use the constants
and messages from them.

Change-Id: I609d6e524f780e6a5beea543a68561bede47813e
Test: make
2017-12-13 18:26:45 -08:00
Jason Monk
3706cf9e28 Merge "Add AppComponentFactory API" 2017-12-14 02:21:12 +00:00
Felipe Leme
a30443b141 Merge "Proper autofill fix to let phone process autofill Settings activity." into oc-mr1-dev
am: f2eddf8df9

Change-Id: I7603e96214ca4e97985b6678cb0e75b7e36d0880
2017-12-14 01:43:23 +00:00
Jeff Sharkey
2619e8f011 Merge "Start accepting Executors instead of Handlers." 2017-12-13 22:48:03 +00:00