Commit Graph

12362 Commits

Author SHA1 Message Date
Mady Mellor
9c777b22da Merge "Add subtype to indicate accessibility text" 2018-01-04 21:02:44 +00:00
TreeHugger Robot
f84ec9687a Merge "Added new Autofill APIs to get name of id used on android:text." 2018-01-04 18:40:24 +00:00
TreeHugger Robot
5d5fa51450 Merge "DPM: Implement Device ID attestation" 2018-01-04 14:24:18 +00:00
TreeHugger Robot
c9f362bd54 Merge "Revert "Fix object pool for lifecycler"" 2018-01-04 01:32:27 +00:00
Felipe Leme
5dc45ca349 Added new Autofill APIs to get name of id used on android:text.
Such resource id is useful to help the autofill service heuristics to figure out
the meaning of the labels without relying on their localized text. For example,
the id could be "username", while the text could be "Nome do usuario".

Test: atest CtsAutoFillServiceTestCases:LoginWithStringsActivityTest

Fixes: 71552872

Change-Id: I13f7080fb3c67f91492a113115ffa43d185d192a
2018-01-03 16:09:55 -08:00
Andrii Kulian
5249bb11b7 Revert "Fix object pool for lifecycler"
This reverts commit 1c110302fe.

Reason for revert: Trying to recycle already recycled item on rotation.

Change-Id: I1ae8337da28aa0923cc1d77a23f2ab5e42957495
2018-01-03 22:00:02 +00:00
Narayan Kamath
695cf72f26 Support chained attribution for alarm related WorkSources.
.. those passed down via the AlarmManager.set() variant that takes
a WorkSource. This required a minor re-arrangement of code in
the ActivityManager. We now treat WorkSources as opaque in the
AlarmManager and simply push them down to the AM (and eventually
to BatteryStats) where they are picked apart.

Test: BatteryStatsNoteTest, AlarmManagerTest
Bug: 62390666
Change-Id: I118f1a1d16aafa41b4f401f1a6a3ba4d2d5eca8f
2018-01-03 09:16:56 +00:00
Eran Messeri
94d5676124 DPM: Implement Device ID attestation
Enable requesting inclusion of device identifiers in the attestation
record issued for keys generated by generateKeyPair.
This is done by passing an array of flags with values indicating which
identifiers should be included.
Since the attestation record will include sensitive identifiers, it can
only be requested by the DPC in Device Owner mode or by the Delegated
Cert Installer in Device Owner mode.

Design note:
DevicePolicyManager defines its own set of constants for the different
identifier types (ID_TYPE_*) and prior to calling
DevicePolicyManagerService it translates them to the values defined by
AttestationUtils (which is not a public class).
The reason is to allow re-use of code in AttestationUtils for preparing
the attestation arguments.
In theory, these constants could be moved from AttestationUtils to
DevicePolicyManager, however that would create a dependency on DPM from
Keystore, which logically does not make sense as Keystore is independent
of the DPM (and in a lower level of the system, conceptually).

Bug: 63388672
Test: cts-tradefed run commandAndExit cts-dev -a armeabi-v7a -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.DeviceOwnerTest#testKeyManagement; runtest frameworks-services -c com.android.server.devicepolicy.DevicePolicyManagerTest#testTranslationOfIdAttestationFlag
Change-Id: Ifb42e8e813fa812a08203b4a81d15b1f91152354
2018-01-02 23:36:15 +00:00
Jorim Jaggi
988f66885c Lock free app animations (4/n): Implement thubmnail
Bug: 64674361
Test: go/wm-smoke
Change-Id: I8f25dae04b69613c93ccb5416c2cda2df6373103
2017-12-27 15:49:55 +01:00
TreeHugger Robot
9f5ceae640 Merge "Document which sys services can be accessed by instant apps" 2017-12-26 04:13:15 +00:00
TreeHugger Robot
b743b067e5 Merge "Don't record audio if UID is idle - core framework" 2017-12-26 03:39:42 +00:00
Svet Ganov
8f90bcc50a Document which sys services can be accessed by instant apps
This change documents that some system services are not available
to instant apps due to the restricted security sandbox they run in.
Also ensure that if target SDK is P WallpaperManager is null if the
backing system service cannot be looked up to be consistent with
the way other system services behave.

Test: Manual

Fixes: 70984822
Fixes: 69848394

Change-Id: I9aae884d5840c92136c7d713fac87e7732dc2642
2017-12-23 20:47:12 +00:00
Andrii Kulian
ab71a93624 Merge "Fix object pool for lifecycler" 2017-12-22 19:48:35 +00:00
TreeHugger Robot
edf829f41b Merge "Enforce platform level animation in CrossProfileApps.startMainActivity" 2017-12-22 11:24:28 +00:00
Andrew Scull
8b2af876d3 Merge "DPMS: expose password blacklist API for SDK" 2017-12-22 09:36:52 +00:00
Andrii Kulian
1c110302fe Fix object pool for lifecycler
The original implementation of object pool for lifecycle
transactions tried to always recycle objects after a
transaction was scheduled. In case when a client was running
in the same process this lead to objects being emptied before
it could actually perform the transaction.
Also when checking if object was already in the pool we should
use "==" instead of equality check.

Bug: 70568084
Bug: 70526039
Bug: 70616950
Test: android.app.servertransaction.ObjectPoolTests
Change-Id: I45eeecc189b9a458d8efdfed256b81cf0baf8b95
2017-12-21 15:36:08 -08:00
TreeHugger Robot
7e3cae8584 Merge "Workaround apps that are doing very very bad things" 2017-12-21 22:07:15 +00:00
Jason Monk
24d12a327d Workaround apps that are doing very very bad things
Disable AppComponentFactory for them.

Test: manual
Bug: 70776434
Change-Id: Iccfc47af360b719578f0ab9771849a822118518d
2017-12-21 10:39:17 -05:00
Naomi Musgrave
db980f4a3c Add id to SecurityEvent.
Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
Test: runtest --path frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/SecurityEventTest.java
Bug: 63910201
Change-Id: I053ec9d6c8281d637ace5dc89057e5f7b5ad6554
2017-12-21 15:34:11 +00:00
TreeHugger Robot
af5bac3d23 Merge "Profile lock timeout." 2017-12-21 13:37:42 +00:00
Mady Mellor
0c99ecc515 Add subtype to indicate accessibility text
Intended to use with SliceItem type text, to denote that text shouldn't
be displayed but rather used for accessibility.

Test: none
Bug: 68378561
Change-Id: I8321fe1b2bccc4c7e26e376e346c29e71c92957b
2017-12-20 13:36:08 -08:00
Mady Mellor
cdba028b5d Merge "Add subtype for priority" 2017-12-20 21:16:17 +00:00
TreeHugger Robot
5bebd1e932 Merge "Unhide HINT_HIDDEN from slices api and rename to HINT_SHORTCUT" 2017-12-20 21:04:38 +00:00
Mady Mellor
ca8e884b85 Add subtype for priority
Intended to use with SliceItem type int to note the priority of an item
(such as an action) within a template.

Test: none
Bug: 68378561
Change-Id: I109adf4ea77638b7d27f3aaa7f8eb1c325287f0c
2017-12-20 10:45:36 -08:00
Ian Lake
1f4e67b6e1 Improve Fragment+Loader deprecation Javadoc
Make it clear that the framework versions of
Fragments and Loaders should be replaced with their
identically named versions in the Support Library.

Reference the recent work on Lifecycle as an example
of a Support Library only change that should motivate
developers to switch to the Support Library
equivalents.

Test: Reviewed new Javadoc
BUG: 70336450
Change-Id: I93151fa0a316bba824c2e55f80f7de9d30bed3c6
2017-12-20 18:16:40 +00:00
TreeHugger Robot
702b491903 Merge "Add MessagingStyle#isGroupConversation()." 2017-12-20 17:20:27 +00:00
Tony Mak
089c35e931 Enforce platform level animation in CrossProfileApps.startMainActivity
With this change, whenever apps start an activity in another profile
using CrossProfileApps.startMainActivity, an animation will be enforced.
For now, we are showing the "open task" animation.
We may put something fancier if we have time in P.

Test: cts-tradefed run cts-dev --module DevicePolicyManager --test - com.android.cts.devicepolicy.CrossProfileAppsHostsideTest
Test: atest services/tests/servicestests/src/com/android/server/pm/crossprofile/CrossProfileAppsServiceImplTest.java
Bug: 70799822

Change-Id: I03525080151c6112633108419d69d64e76a511f3
2017-12-20 17:04:15 +00:00
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
Kodlee Yin
9ac617c5a2 Add MessagingStyle#isGroupConversation().
This will allow apps to mark a Notification's MessagingStyle as a group
conversation. This is useful because the current implementation
overloads MessagingStyle#conversationTitle; which, when not null,
implies a group conversation. Instead of relying on this implicit
contract, we include this change's explicit field.

Test: runtest -x
core/tests/coretests/src/android/app/NotificationTest.java
Bug: 67717177
Bug: 70725009

Change-Id: I5405b6b0ca9723a06113482c04b8c2f8e1a4318c
2017-12-19 14:56:18 -08:00
Mady Mellor
225e0dac45 Unhide HINT_HIDDEN from slices api and rename to HINT_SHORTCUT
Test: manual, build a slice with HINT_SHORTCUT, note content doesn't appear
      in slice template but can appear when displayed as shortcut
Bug: 68378574
Change-Id: I4f7d0b8dbbcb0da4efe79a709b0d9fbf24026a6e
2017-12-19 14:14:17 -08: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