Commit Graph

12378 Commits

Author SHA1 Message Date
TreeHugger Robot
26db21ba9c Merge "Remove @SystemApi annotation from private or package-private members" 2018-01-06 00:54:32 +00:00
TreeHugger Robot
a068cd68c0 Merge "Binding on-demand #8: Miscellaneous usages" 2018-01-05 18:21:53 +00:00
Bernardo Rufino
fa51853ae5 Binding on-demand #8: Miscellaneous usages
Migrate usages of the transport binder to binding on-demand:
* getDestinationString()
* isAppEligibleForBackup()
* dump()

For getDestinationString() we'll be introducing an invisible bug for
people that haven't updated GMSCore to include the usage of
updateTransportAttributes() API introduced in earlier CL. The bug is
that that text won't change, it'll remain constant. It's invisible
because currently only place that uses that method is Settings in some
circumstances that depend on the transport, and those circunstances
don't happen with our transports. Check http://ag/1831025.

For isAppEligibleForBackup(), a new filterAppsEligibleForBackup() is
created and there we bind on-demand.

Change-Id: Idc9e31f0e8eda8531e204c05a84fafdaf0247d08
Ref: http://go/br-binding-on-demand
Bug: 17140907
Test: adb shell dumpsys backup, observe destination of transports
Test: adb shell bmgr backupnow --all, observe only eligible apps got backed-up
Test: Force-loaded settings screen and observed destination string
Test: m -j RunFrameworksServicesRoboTests
2018-01-05 16:33:33 +00:00
Peter Visontay
5a2a1ef74a Define a @SystemApi string ID for each App Op.
Internal numeric op codes may change, but the public string IDs must consistently refer to the same operation.

Bug: 63907873
Test: Ran the tests being added in this this topic: make CtsPermissionTestCases -j32 && cts-tradefed run singleCommand cts-dev -m CtsPermissionTestCases --test android.permission.cts.AppOpsTest
Change-Id: I12bd9e2384d938120a403c4d76be4c1479ffd4ee
2018-01-05 13:09:01 +00:00
Lucas Dupin
eb486d48a2 Do not block ambient mode IPC
This can happen asynchronously, blocking may lower
frame rate.

Bug: 70857288
Test: press power button, look at AoD wallpaper
Change-Id: I453082adc0d5f58eb8e7cbf7663fca0cd0183075
2018-01-04 21:36:00 -08:00
Jeff Sharkey
cc74ecb26c Merge "Intent to manage subscription plans." 2018-01-05 03:49:06 +00:00
Andreas Gampe
ead08f70db Merge changes I872a81ae,I0b9e72d2 am: f30c2c02f0 am: 34445736d8
am: 3fcce9f251

Change-Id: Ic78c8cea300e402328313f8e70dcbee2d4716b64
2018-01-05 01:47:23 +00:00
Andreas Gampe
3fcce9f251 Merge changes I872a81ae,I0b9e72d2 am: f30c2c02f0
am: 34445736d8

Change-Id: I506b0e29977f0fbb410066dea46c99f264e01028
2018-01-05 01:39:13 +00:00
TreeHugger Robot
feeb12a962 Merge "Let wallpaper know when to animate AoD transition" 2018-01-05 00:32:25 +00:00
Philip P. Moltmann
e92d9e1156 Merge changes from topic "BackupManagerModernInstallInterface"
* changes:
  Disable installation via adb restore
  Use modern install method in backup service
2018-01-04 23:50:40 +00:00
Jeff Sharkey
717f52f2dd Intent to manage subscription plans.
Define an API for carrier apps to provide a deep-link into their app
for the user to see more details about their billing relationship,
such as upgrading plans.

The createManageSubscriptionIntent() method is ready for OS
components to use when deciding if they should show a "MANAGE"
button in their UI, and the returned Intent is fully constructed
and ready to roll.

Test: builds, boots
Bug: 64133169
Change-Id: I9b2775b7cba5313f517996870135eb4682082873
2018-01-04 16:11:51 -07:00
Philip P. Moltmann
79c238ada6 Use modern install method in backup service
Test: adb backup -apk myApp -f backup ; adb restore backup
Change-Id: I2bbcb0487ecc525a6dc8a2693b15ce624db275b0
2018-01-04 13:26:28 -08:00
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
Andreas Gampe
158bde462e Revert "Frameworks: Move SharedPreferencesImpl to Future"
This reverts commit 70b600d456.

In preparation for a different fix. There are too many loopholes
with updates vs commits.

Bug: 67986472
Bug: 71533447
Test: m
Test: Device boots
Test: m cts && cts-tradefed run commandAndExit cts-dev --module CtsContentTestCases -c android.content.cts.SharedPreferencesTest
Change-Id: I872a81ae1a26e1f77aad2a52daf88e093a686ec6
2018-01-03 17:58:44 -08:00
Andreas Gampe
383f4f397b Revert "Frameworks: Silently ignore InterruptedException"
This reverts commit c8d5fc8572.

In preparation for different fix.

Bug: 67986472
Bug: 70122540
Bug: 71533447
Test: m
Test: Device boots
Test: m cts && cts-tradefed run commandAndExit cts-dev --module CtsContentTestCases -c android.content.cts.SharedPreferencesTest
Change-Id: I0b9e72d271725e15c20b68de981303c96ac1bd2a
2018-01-03 17:58:39 -08: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
Jiyong Park
8505e098bd Remove @SystemApi annotation from private or package-private members
Some private or package-private members have been marked as @SystemApi,
which do not make sense as they aren't accessible to apps due to the
access modifier. Having annotation on such members hasn't been harmful,
but will soon trigger CTS failures when we do the exact match for
SystemAPIs; a runtime entity annotated as @SystemApi have to exist in
the documented API (e.g. system-current.txt). So, removing the bogus
annotations.

Bug: 67891551
Test: m -j does not require m update-system-api
Change-Id: I0083475ef5435cf9a582c2ce1be469c92328fe69
2018-01-03 10:03:38 +09: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
Lucas Dupin
660d573e43 Let wallpaper know when to animate AoD transition
Sometimes the screen will blank, and sometime the
wallpaper has the opportunity to animate the
transition.

Bug: 64155983
Test: atest tests/Internal/src/android/service/wallpaper/WallpaperServiceTest.java
Test: atest packages/SystemUI/tests/src/com/android/systemui/doze/DozeWallpaperStateTest.java
Change-Id: Ia92c00edb98eeeba42da33bdc7bec3feb961a658
2017-12-20 13:15:44 -08: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