Commit Graph

8220 Commits

Author SHA1 Message Date
Automerger Merge Worker
fb829df378 Merge "[RCS] Add IMS service into system service registry" am: 6a1d13f58e am: a962a65575
Change-Id: I61549d3d4da7ffdf5f2d497e52cd7a2fdd0f2c05
2019-12-17 00:10:51 +00:00
James Lin
6a1d13f58e Merge "[RCS] Add IMS service into system service registry" 2019-12-16 23:28:44 +00:00
James.cf Lin
304a66a3f0 [RCS] Add IMS service into system service registry
Bug: 139260826
Test: Manual
Change-Id: Ie8625706bb9b18c3a9d1a55d17d3c1c045eb104e
2019-12-13 07:41:02 +08:00
Automerger Merge Worker
ab24f154e2 Merge "Declare ParceledListSlice as generic type" am: ea1b85a5eb am: c48e579ad8
Change-Id: If2de0f0db0c81981e922e96601d20e32b7b4a6d8
2019-12-12 06:24:45 +00:00
Jeongik Cha
ea1b85a5eb Merge "Declare ParceledListSlice as generic type" 2019-12-12 06:00:34 +00:00
Automerger Merge Worker
19f573a89b Merge "Remove usage of IccCardConstants hidden APIs" am: b181ba61e2 am: b09b13cf38
Change-Id: I5a8974d8cd5d2af70996ec60eae924ddd435c840
2019-12-10 22:10:05 +00:00
Jayachandran C
316302c001 Remove usage of IccCardConstants hidden APIs
Expose the string IccCardConstants as system APIs
Use TelephonyManger.SIM_STATE_XXX for remaining

Bug: 145767148
Test: Build
Change-Id: I5711d783be8c8414b8f9d7baa80cb4224bd771aa
2019-12-06 16:06:12 -08:00
Treehugger Robot
2b65793cd6 Merge "Merge Android10 QPR1 into AOSP master" 2019-12-03 23:15:02 +00:00
Neil Fuller
f807b4c364 Merge "Add a new time zone detection service" am: 7d8a624085
am: 256f4df4b6

Change-Id: Ie1b28c5cea14a23beac2e70eb7878f7f09461d6c
2019-12-03 08:42:57 -08:00
Neil Fuller
256f4df4b6 Merge "Add a new time zone detection service"
am: 7d8a624085

Change-Id: Ic30cd636b4863a507dda0bdb05e982ee411d936f
2019-12-03 08:30:50 -08:00
Neil Fuller
7d8a624085 Merge "Add a new time zone detection service" 2019-12-03 08:40:07 +00:00
Peter Wang
ed6d7e8b6e Merge "[Telephony Mainline] Exposed sendOrderedBroadcast" am: 471b839d02
am: 80a5a3db13

Change-Id: I0726f8853b46571976ae6f634e6a05265105bb3f
2019-12-02 13:54:51 -08:00
Peter Wang
80a5a3db13 Merge "[Telephony Mainline] Exposed sendOrderedBroadcast"
am: 471b839d02

Change-Id: Icd0230b880346a4ec573ccaa8d1adbade336f87a
2019-12-02 13:47:11 -08:00
Neil Fuller
3352cfce2f Add a new time zone detection service
Add a new time zone detection service. Much of the code is from
frameworks/opt/telephony with some changes for naming, threading and
to modify the interaction with the "Callback" class.

Overall goal:

Implementing the service in the system server means it will be easier to
add new time zone detection logic unrelated to telephony in future.

Bug: 140712361
Test: atest com.android.server.timezonedetector
Test: atest android.app.timezonedetector
Change-Id: I89505fc4fecbd3667b60f8e1479b8f177eaa60ae
Merged-In: I89505fc4fecbd3667b60f8e1479b8f177eaa60ae
(cherry picked from commit 3e3b5405b6)
2019-11-28 13:27:55 +00:00
Peter Wang
cf8bfcc4c2 [Telephony Mainline] Exposed sendOrderedBroadcast
with appOp as String and options as Bundle

Bug: 139077993
Test: Build, GsmInboundSmsHandlerTest, CdmaInboundSmsHandlerTest and WapPushOverSmsTest
Change-Id: I60e21c7202d1bc7c5d28dfad2e2edde902f28a15
Merged-In: I60e21c7202d1bc7c5d28dfad2e2edde902f28a15
2019-11-27 20:10:20 -08:00
Jeongik Cha
7aace291de Declare ParceledListSlice as generic type
The parcelable is misused as generic type,
even though AIDL compiler have not supported it yet.

So, turn on generic in this type.

Test: m
Bug: 145275738
Change-Id: If1f6e3238511439f1aca7b13b945be5998d04045
2019-11-27 16:47:46 +00:00
Jiyong Park
0331ee35b1 Merge "Remove @SystemApi annotation for an overriding method" am: 5c7bd75060
am: 232c2e84da

Change-Id: I9976fc35ee7f21aea3563d84cb2d871d03471517
2019-11-26 13:39:28 -08:00
Jiyong Park
232c2e84da Merge "Remove @SystemApi annotation for an overriding method"
am: 5c7bd75060

Change-Id: Icc63a9ee9e0a8752dde244f1f885141a1475c834
2019-11-26 13:33:58 -08:00
Jiyong Park
c624e7d158 Remove @SystemApi annotation for an overriding method
Context.registerReceiverForAllUsers are already marked as @SystemApi.
The same method in ContextWrapper overriding it doesn't need to be
annotated as such. In fact, that API is even not recorded in
system-current.txt.

Bug: 144424011
Test: atest CtsSystemApiAnnotationTestCases
Merged-In: I60890104bf20a2c674edd91ec6b487cca1b4e37b
Change-Id: I60890104bf20a2c674edd91ec6b487cca1b4e37b
2019-11-26 18:04:49 +00:00
Meng Wang
ec606bd492 Merge "System API: Context#registerReceiverForAllUsers" am: 9e590914cb
am: 5eda192492

Change-Id: Ia177e20dd70a6db34accd01dfa1e4c59f264cbc1
2019-11-25 10:16:28 -08:00
Meng Wang
5eda192492 Merge "System API: Context#registerReceiverForAllUsers"
am: 9e590914cb

Change-Id: I2d98300ad4958d19e69dcdfda83e9d5df086d43a
2019-11-25 10:07:43 -08:00
Meng Wang
9e590914cb Merge "System API: Context#registerReceiverForAllUsers" 2019-11-25 17:53:53 +00:00
Oli Lan
129a2c09ac Wait for available rollbacks in RollbackTest. am: 77a40731f8
am: 170a519878

Change-Id: I8a40c818a3ea6499f28b096a2d342b26e7153080
2019-11-25 05:43:32 -08:00
Oli Lan
eb559106bd Include NewRollbacks in result of getAvailableRollbacks. am: dc4a36105b
am: b63dfa2d3b

Change-Id: I4f35f5098c650288db33bf304ba8adbac14f4ed6
2019-11-25 05:43:25 -08:00
Oli Lan
ab81c07bb0 Remove INSTALLED_USERS extra from ACTION_PACKAGE_ENABLE_ROLLBACK. am: 87a504d1fc
am: 682e501c2a

Change-Id: Icad482e10141258d65b9bbc380830418e17486e8
2019-11-25 05:43:12 -08:00
Richard Uhler
38467d7eef Cleanup some obsolete TODOs and unused code. am: cda1a17516
am: 01178b4f9d

Change-Id: I8077abf3a2262e13a0c638bb2c7f8c052d22a7f6
2019-11-25 05:42:44 -08:00
Oli Lan
170a519878 Wait for available rollbacks in RollbackTest.
am: 77a40731f8

Change-Id: I83b8f07f333e318bb7fd31b2bec3f868b1848c6c
2019-11-25 05:35:57 -08:00
Oli Lan
b63dfa2d3b Include NewRollbacks in result of getAvailableRollbacks.
am: dc4a36105b

Change-Id: I6d45d8a2c408e4d8def25895846d6b7c3bf0de29
2019-11-25 05:35:35 -08:00
Oli Lan
682e501c2a Remove INSTALLED_USERS extra from ACTION_PACKAGE_ENABLE_ROLLBACK.
am: 87a504d1fc

Change-Id: I8636d29038d10d3f4182e130de08ad8efa294a8e
2019-11-25 05:34:25 -08:00
Richard Uhler
01178b4f9d Cleanup some obsolete TODOs and unused code.
am: cda1a17516

Change-Id: I56bce126042670678002ddbbfcf14ff9f94860c3
2019-11-25 05:24:46 -08:00
Bill Lin
63e6d6af01 Merge changes from topic "migrate_CtsStagedInstallTest_RollbackTest"
* changes:
  Add multi-user test for the general non-staged case
  Increase timeout in testNativeWatchdogTriggersRollback
  Fix flaky testEnableRollbackTimeoutFailsRollback test
  Wait for available rollbacks in RollbackTest.
  Include NewRollbacks in result of getAvailableRollbacks.
  Rename RollbackData to Rollback.
  Remove INSTALLED_USERS extra from ACTION_PACKAGE_ENABLE_ROLLBACK.
  Update to new RollbackUtils.sendCrashBroadcast API.
  Extend ROLLBACK_COMMITTED broadcast for the multi-user case
  Fix NullPointerException.
  Cleanup some obsolete TODOs and unused code.
  Test Native Watchdog triggers RollbackManager rollback
  Uninstall testapps before running SecondaryUserRollbackTest
  delete ENABLING rollback if we can't get session info for it.
  Add test for rollback of userdata with multiple rollbacks
  Load rollback data in RollbackManagerServiceImpl constructor.
  Use "commit" for rollbacks instead of "execute".
  Add TestApi to block the RollbackManagerHandlerThread.
  Use Slog in RollbackManager, not Log
  Make setRequestDowngrade @TestApi
  Migrate RollbackTest and StagedRollbackTest to cts utils
  Add .apex suffix to apex files during validation
  Add host side test for secondary user rollback
  Reduce ENABLE_ROLLBACK timeout to 0 for timeout test.
2019-11-25 02:56:10 +00:00
Meng Wang
e3bd3babbc System API: Context#registerReceiverForAllUsers
Bug: 141193711
Test: make
Merged-In: Ie692d2ac27474b9fe11f5548bc504aa00c5ad53c
Change-Id: Ie692d2ac27474b9fe11f5548bc504aa00c5ad53c
2019-11-23 02:17:27 +00:00
Makoto Onuki
b0100311bf Merge "Explicitly take flags in createContextAsUser()" am: a7948ddcb9
am: d52db070cd

Change-Id: I7ed103b7c148508635818e779b55a585b1540c85
2019-11-21 08:13:05 -08:00
Makoto Onuki
d52db070cd Merge "Explicitly take flags in createContextAsUser()"
am: a7948ddcb9

Change-Id: I6947903d66da1e64c461a1557e82a72a97a8848b
2019-11-21 08:05:06 -08:00
Oli Lan
77a40731f8 Wait for available rollbacks in RollbackTest.
This changes RollbackTest to retry checks for available rollbacks for
a certain period of time, using a new RollbackUtils method
waitForAvailableRollbacks.

Currently many of the tests in RollbackTest are flaky due to race conditions
between checking for available rollbacks and the installer onFinished callback.
This CL should fix all of those issues.

The previous attempt to resolve this by adding NewRollbacks speculatively to
the results of getAvailableRollbacks was not successful. This CL reverts that
change so that getAvailableRollbacks once again only returns rollbacks that are
actually available.

Bug: 136548146
Test: atest RollbackTest run on cuttlefish on acloud repeatedly
Change-Id: I0389ef2413e7642fe2f6ef1a33aef218dd1896ed
Merged-In: I27e2513b34f49af2f41cd627a5d2550541831e11
2019-11-21 17:51:11 +08:00
Oli Lan
dc4a36105b Include NewRollbacks in result of getAvailableRollbacks.
This CL adds NewRollbacks to the return value of getAvailableRollbacks,
as long as the PackageRollbackInfo is complete (i.e. there is one for
each child session in the install).

Including these should avoid the potential race condition between the
install finishing and getAvailableRollbacks being called which affected
some of the tests. This means that the draining of the handler that was
previously added to getAvailableRollbacks can now be removed.

In order to avoid a similar race condition when rollbacks are expired, this
change also cancels corresponding NewRollbacks when expireRollbackForPackage
is called.

Bug: 136241838
Bug: 136548146
Test: atest RollbackTest
Test: manual local test with delay added to onFinished in the service callback
Change-Id: Ie4581d218077dc16e53c337a5bb76609cc50a57e
Merged-In: I015ee5925e38118c40f4b9e145f78fb12c0e2890
2019-11-21 17:50:30 +08:00
Oli Lan
87a504d1fc Remove INSTALLED_USERS extra from ACTION_PACKAGE_ENABLE_ROLLBACK.
This changes RollbackManagerServiceImpl to use the list of installed users
that is passed in to snapshotAndRestoreUserData for the purpose of snapshotting.

With this change, it is no longer necessary for the list of installed users to be
added as an extra to the ENABLE_ROLLBACK intent, so that extra
(EXTRA_ENABLE_ROLLBACK_INSTALLED_USERS) is removed.

Bug: 139181444
Test: atest RollbackTest
Test: atest AppDataRollbackHelperTest
Exempt-From-Owner-Approval: Already approved in
https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/9168506

Change-Id: Iff42f4e5b2d02d1124d64a5fedc659a41cddd5fc
Merged-In: Iffd63977a7498e3cba20d2039af623c921d38f57
2019-11-21 17:41:10 +08:00
Richard Uhler
fcf64e8dbe Use "commit" for rollbacks instead of "execute".
Fix a couple lingering references to "executing" rollbacks. We've long
since switched to the terminology "commit", to highlight that a staged
rollback that has been committed will not take effect until the device
reboots.

Fixes: 136044234
Test: atest RollbackTest
Change-Id: If548b0340101db13f4fdce7c2de3fe1e8283a260
Merged-In: Ic364778c253ff59af8206824a66df72569ab1307
2019-11-21 17:07:39 +08:00
Richard Uhler
0c48af84fe Add TestApi to block the RollbackManagerHandlerThread.
To eliminate flakiness when testing timeout conditions for
RollbackTest.testEnableRollbackTimeoutFailsRollback.

Test: atest RollbackTest.testEnableRollbackTimeoutFailsRollback in a loop
Bug: 134373106
Change-Id: I2d1de148a83231f3fd48cc05b7320fa5fdf091ce
Merged-In: I01f3e769711ffa51fa714ff4bc81e70887f427ad
2019-11-21 16:58:45 +08:00
shafik
895901357e Make setRequestDowngrade @TestApi
Test: build
Bug: 134653708
Exempt-From-Owner-Approval: Already approved in
https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/8350817/

Change-Id: I732aca8011490fa5815199451566ac8b0b1a2204
Merged-In: Idf99e0810e2e9040f49f06a00722567ac15bbe18
2019-11-21 13:46:06 +08:00
Mohammad Samiul Islam
73f1771d27 Add .apex suffix to apex files during validation
Previously, the apex file being installed was moved into the staging
directory as same name provided during installation, due to which, when
the source apex file of installation did not have .apex suffix in its
file name, it failed validation in apexd. Now, if an apex file does not
have proper suffix, it will be concatenated during validation in
PackageInstallerSession.

Bug: 124837227
Test: atest CtsStagedInstallHostTestCases
Test: atest StagedInstallTest#testInstallStagedApexWithoutApexSuffix
Exempt-From-Owner-Approval: Already approved in
https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/8528906

Change-Id: I0095c1f985839de8247d9e6aebae948e0e834e7e
Merged-In: Ice41f601dc42736ca0cdf2bad0817f0c00f50648
2019-11-21 13:46:06 +08:00
Makoto Onuki
6b1e9d2f9f Explicitly take flags in createContextAsUser()
Bug: 142472686
Test: atest android.content.cts.ContextTest#testCreateContextAsUser
Change-Id: Id2e3d5ffe5887a4916e0872a7e85d62cbb439744
(cherry picked from commit e5449f0b34)
Merged-in: Id2e3d5ffe5887a4916e0872a7e85d62cbb439744
2019-11-20 16:20:23 -08:00
Jordan Liu
ec296c8e53 Merge "Remove unneeded @RequiresPermission annotation" am: 0a1b47573e
am: 277ea3584f

Change-Id: I83c853e4512261f0c94432659a1b7a749d6fd32a
2019-11-20 14:29:40 -08:00
Jordan Liu
277ea3584f Merge "Remove unneeded @RequiresPermission annotation"
am: 0a1b47573e

Change-Id: I47d83e0d224cb9840b326212f84c83a8e16c1a85
2019-11-20 14:22:03 -08:00
Makoto Onuki
2dfdf1a4cf Merge "Add Context.createContextAsUser()" am: 63d5e4a0b9
am: 056b8f00b7

Change-Id: I703b0234c75f91ad548a0c431277d684212e0586
2019-11-20 14:11:19 -08:00
Jordan Liu
0a1b47573e Merge "Remove unneeded @RequiresPermission annotation" 2019-11-20 22:04:20 +00:00
Makoto Onuki
056b8f00b7 Merge "Add Context.createContextAsUser()"
am: 63d5e4a0b9

Change-Id: I022daba2bc9234ffe7b7fa760942a58852e406b3
2019-11-20 14:04:20 -08:00
Treehugger Robot
63d5e4a0b9 Merge "Add Context.createContextAsUser()" 2019-11-20 21:53:01 +00:00
Makoto Onuki
9432f7d43c Add Context.createContextAsUser()
Without it, apps (mainline modules) will need to use createPackageContext...,
which is a bit painful.

Bug: 142472686
Test: atest android.content.cts.ContextTest#testCreateContextAsUser
Change-Id: Id640e03862462724df1a4a3101f0b08faafba22f
(cherry picked from commit b844001d6a)
Merged-in: Id640e03862462724df1a4a3101f0b08faafba22f
2019-11-19 20:51:04 -08:00
Patrick Baumann
ff21f7b085 Merge "DO NOT MERGE Avoids deadlock when applying preferred activities" am: 35dd014a79
am: 92269e5ef8

Change-Id: I6d95f0bbdaa146c4d96f8b8c5f715ef2053074be
2019-11-19 16:20:20 -08:00