Commit Graph

12404 Commits

Author SHA1 Message Date
Sudheer Shanka
5b9f065754 Merge "Update DPMS to push active admins info to UsageStatsService." 2018-01-11 18:45:15 +00:00
Jiuyu Sun
9e7bf9e304 Merge "Add EuiccCardManager and EuiccCardController." 2018-01-11 18:09:40 +00:00
Lucas Dupin
606c532dca Merge "Allow custom keyguard transient message" 2018-01-11 17:23:59 +00:00
Bryce Lee
609e37b35b Merge "Pause activity when making visible from stopped state." 2018-01-11 15:27:10 +00:00
Antoan Angelov
f79af5e4a1 Merge "Call PROFILE/DEVICE_OWNER_CHANGED broadcast and onTransferCompleted callback upon a successful transfer." 2018-01-11 11:18:05 +00:00
TreeHugger Robot
e6050a4a0f Merge changes from topic "messaging_people"
* changes:
  Clipping to the top roundness when scrolling
  Made the notification side paddings consistent
  Changing messaging style and overall visual adoption
  Improved the MessagingStyle API with Person
  Added People to the Notification API
2018-01-11 03:07:09 +00:00
Holly Jiuyu Sun
5c11024d13 Add EuiccCardManager and EuiccCardController.
EuiccCardManager is in the same path with EuiccManager.
EuiccCardController is in the same path with EuiccController.
Use getAllProfiles() as an example interface.
The implementation of EuiccCard and its content will be added in a
follow up CL.
The new API is marked as @hide and TODO for @SystemApi.

Bug: 38206971
Test: test on phone
Change-Id: I153937c0f79bdd1a00b06b234a6e254a3f43072c
2018-01-10 18:59:50 -08:00
Sudheer Shanka
101c353a7d Update DPMS to push active admins info to UsageStatsService.
Bug: 71710099
Test: atest services/tests/servicestests/src/com/android/server/usage/AppStandbyControllerTests.java
Test: atest services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
Change-Id: Ia46be9008470b0228978306b9992560fc4f2c586
2018-01-10 17:19:55 -08:00
TreeHugger Robot
c66fd4a421 Merge "FRP: Make SystemAPI" 2018-01-10 23:09:19 +00:00
Lucas Dupin
ef88654459 Allow custom keyguard transient message
TrustAgentServices can now present a transient
message on the lock screen or AoD.

Bug: 63940122
Test: call TrustAgentService#showKeyguardErrorMessage via service,
      lock device, wait for message to show up.
Change-Id: I222118787a1afb526ce7c90d46c41d0f20d8d912
2018-01-10 14:07:56 -08:00
Dianne Hackborn
84c699a4b9 Merge "Swap "foreground service" and "bound foreground service" proc states." 2018-01-10 21:14:31 +00:00
arangelov
8bae4eaa4d Call PROFILE/DEVICE_OWNER_CHANGED broadcast and onTransferCompleted callback upon a successful transfer.
Test: cts-tradefed run cts-dev --module DevicePolicyManager --test com.android.cts.devicepolicy.MixedProfileOwnerHostSideTransferTest#testTransferOwnerChangedBroadcast
Test: cts-tradefed run cts-dev --module DevicePolicyManager --test com.android.cts.devicepolicy.MixedProfileOwnerHostSideTransferTest#testTransferCompleteCallback
Test: cts-tradefed run cts-dev --module DevicePolicyManager --test com.android.cts.devicepolicy.MixedDeviceOwnerHostSideTransferTest#testTransferOwnerChangedBroadcast
Test: cts-tradefed run cts-dev --module DevicePolicyManager --test com.android.cts.devicepolicy.MixedDeviceOwnerHostSideTransferTest#testTransferCompleteCallback
Bug: 69542936
Bug: 69543044
Change-Id: Ifbe3ac0029794eba185e538e5a490073d5309f0b
2018-01-10 21:07:44 +00:00
Bryce Lee
0bd8d42c0a Pause activity when making visible from stopped state.
It is possible for an activity to become visible without gaining
focus. For example, if a paused activity in split-screen finishes
itself, the activity below will become visible. Currently this
activity will not exit the stopped state. This changelist
addresses this inconsistency by cycling the activity to paused if
it becomes visible in the stopped state.

Change-Id: I170d586793dadb0d6ff59d1ad68f2d94699f9ca6
Bug: 71582913
Test: atest ActivityRecordTests#testPausingWhenVisibleFromStopped
2018-01-10 13:04:16 -08:00
Selim Cinek
afeed29bdc Changing messaging style and overall visual adoption
The messaging style is changed to a bubble-less design.
In addition are we also updating a few spacings in
order for it to look nicer / more balanced.

Test: manual
Change-Id: I43326bd8a23cd1f1d5964d2d6740fde99d29c7e4
2018-01-10 20:14:03 +00:00
Peter Visontay
5fdef14b82 Merge "Mark AppOpsManager.setMode() @TestApi." 2018-01-10 12:54:40 +00:00
Amith Yamasani
a0ee7c35e2 Merge "Track last job run time" 2018-01-10 00:05:22 +00:00
Dianne Hackborn
10fc4fdd13 Swap "foreground service" and "bound foreground service" proc states.
It has become apparent that apps running foreground services is
a much more important (and less common) state than all the various
ways apps run in the foreground because of the system being bound
to them or whatever else.  So push this up about the bound foreground
service state, right after the explicit TOP state.  Then we can
keep these together as "the app is explicitly running in the
foreground for some reason", etc.

Bug: 70808931
Test: CtsAppTestCases
Change-Id: Icfc1905b8e3eb60ddf26118c61ec1ef095659436
2018-01-09 15:55:55 -08:00
TreeHugger Robot
47966f8f49 Merge "Update on a few DevicePolicyManager APIs for affiliated PO" 2018-01-09 21:04:29 +00:00
Kodlee Yin
245a749dd6 Merge "Fix compatibility in MessagingStyle." 2018-01-09 18:22:07 +00:00
Alex Chau
7fbe61dc20 Update on a few DevicePolicyManager APIs for affiliated PO
- Disallow managed profile from disabling keyguard and statusBar as it
  has no effect
- Removed the ability for affiliated profile owner to set device owner
  lockscreen message, as the message is not per user but set globally,
  where the original intention is to set a per user lockscreen message
- Updated javadoc accordingly

Bug: 64383519
Test: Invoking setKeyguardDisabled and setStatusBarDisabled with managed profile fails
Change-Id: Ib3fdf44f55a7c5913ea38647c582bc962329c842
2018-01-09 11:13:22 +00:00
Amith Yamasani
53f06eae61 Track last job run time
JobScheduler can store the last job run time
for an app and use it later to help with
throttling.

Also, allow reporting a usage for a temporary
period. This will put the app in ACTIVE for a
minimum specified period during which timeouts
and predictions will not be able to reduce the
bucket level.

Bug: 71536897
Test: atest AppIdleHistoryTests
      atest AppStandbyControllerTests
Change-Id: I2985f7f3766671f15ea641972346c69875f17946
2018-01-08 17:22:15 -08:00
TreeHugger Robot
26db21ba9c Merge "Remove @SystemApi annotation from private or package-private members" 2018-01-06 00:54:32 +00:00
Kodlee Yin
14656423a6 Fix compatibility in MessagingStyle.
The changes introduced to add MessagingStyle#isGroupConversation had
an implementation bug wherein an application that targets SDK < P
can set a non-null MessagingStyle#setConversationTitle which, in that
SDK version, would also denote it being a group conversation. A
listener targetting SDK >= P would be able able to capture this
notification, but incorrectly be given false when calling
MessagingStyle#isGroupConversation. This CL adds back legacy
functionality to #isGroupConversation by checking the
application's SDK version when they call #setConversationTitle
and interally set #isGroupConversation to true.

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

Change-Id: I2233e3d0b6d4fcf9823e50cd7aa31b76bbaddaed
2018-01-05 10:37:29 -08: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
b97fbc8c5f Mark AppOpsManager.setMode() @TestApi.
There's a CTS test that accesses this via reflection, which we want to fix: AppOpsTest.testSetMode().

Test: make CtsPermissionTestCases -j32 && cts-tradefed run singleCommand cts-dev -m CtsPermissionTestCases --test android.permission.cts.AppOpsTest
Change-Id: I8e62d55271caaa730c4233f761145f90cc34111c
Bug: 71626306
2018-01-05 15:09:01 +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