Commit Graph

8173 Commits

Author SHA1 Message Date
Mark Chien
2410d67357 Merge "[Tether13] Move TetheringManager into framework" 2019-12-20 13:43:46 +00:00
Fan Zhang
c55310438b Merge "Introduce telecom api to launch emeregency dialer." 2019-12-19 22:07:42 +00:00
Fan Zhang
2b2458e094 Introduce telecom api to launch emeregency dialer.
Test: manual
Bug: 136194151
Change-Id: I5c9732062e5123539343843fb9a9ae3ca7111890
Merged-In: I5c9732062e5123539343843fb9a9ae3ca7111890
2019-12-19 20:50:31 +00:00
markchien
6d06f6d51a [Tether13] Move TetheringManager into framework
Move tethering out of ConnectivityService. All client would
use TetheringManager to talk with TetheringService directly.

Bug: 144320246
Test: -build, flash, boot
      -atest TetheringTests

Change-Id: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e
Merged-In: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e
2019-12-19 20:53:06 +08: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
Jeongik Cha
ea1b85a5eb Merge "Declare ParceledListSlice as generic type" 2019-12-12 06:00:34 +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
7d8a624085 Merge "Add a new time zone detection service" 2019-12-03 08:40:07 +00: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
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
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
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
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
277ea3584f Merge "Remove unneeded @RequiresPermission annotation"
am: 0a1b47573e

Change-Id: I47d83e0d224cb9840b326212f84c83a8e16c1a85
2019-11-20 14:22:03 -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
92269e5ef8 Merge "DO NOT MERGE Avoids deadlock when applying preferred activities"
am: 35dd014a79

Change-Id: I9b4646c9c0674380e37eea44a226b1b279b53f6b
2019-11-19 16:05:31 -08:00
Patrick Baumann
3fa8853331 DO NOT MERGE Avoids deadlock when applying preferred activities
Prior to this change, we were resolving the mime type of a given intent
while holding the package lock. With this change, we instead rely on the
preferred-activity declaration to define the mime type if it's
important, removing need for an activity manager service call and the
potential for deadlock.

Fixes: 143105100
Test: Manual; sideload to /system/etc/preferred-apps/ and reset app preferences
Change-Id: Ia87b7ecbd7987ef654fb0fc2bda942cd6a9c00a7
2019-11-19 21:43:48 +00:00
Hall Liu
dab3711435 Merge commit '1d7a53da981b7d4281c58af7eb9b150163b344a6' into manual_merge_1d7a53da981b7d4281c58af7eb9b150163b344a6
Change-Id: Ie08d8bb30e48a9e7ade85334c6195a791ecc0d9b
2019-11-19 12:37:24 -08:00
Jordan Liu
31a4da61b5 Remove unneeded @RequiresPermission annotation
Fixes: 144360225
Test: no change to behavior
Change-Id: I7b3ab01c4d232013dcc19de32cc8e2cee9b8cb5a
2019-11-19 11:47:53 -08:00
Hall Liu
1d7a53da98 Merge changes from topic "mainline4"
* changes:
  Add new API for Telecom to send phone state
  Minor style correction to avoid merge conflict
  non-mainline telephony related AIDL refactor/decoupling
2019-11-18 22:31:27 +00:00
Chen Xu
2d98a66b18 Merge "add a new telephony protection level"
am: cd953e939f

Change-Id: Ie275baf92a865fe1dc5855b00e49944d2598e4b4
2019-11-18 11:16:00 -08:00
Chen Xu
da02e07b92 add a new telephony protection level
for oems which take telephony mainline module, all telephony related
apks will be signed with non-platform certificate. that said apks won't
be able to grant platform signature permission. Solution is to add a new
telephony protection level.

Bug: 141479803
Test: cts & manual
Change-Id: Ib3be016080d42fd76e7c131f4e44d815ce431e6e
(cherry picked from commit 45c183d201)
Merged-in: Ib3be016080d42fd76e7c131f4e44d815ce431e6e
2019-11-17 17:49:41 -08:00
Chen Xu
8eb62f9485 non-mainline telephony related AIDL refactor/decoupling
1. decouple IOnSubscriptionChangedListener AIDL from telephonyMainline
2. other refactor. moving APIs which will not be included in
telephony mainline to frameworks/base/core/java/android/telephony.
Moving internal classes like AIDL which will not be included in
telephony mainline to
framework/base/core/java/com/android/internal/telephony

Bug: 140908357
Test: Build & unit test
Change-Id: I9413ef758cceadd251d03f3b5ea1054cc48ef044
Merged-In: I9413ef758cceadd251d03f3b5ea1054cc48ef044
2019-11-15 18:02:40 -08:00
Artur Satayev
59318bab67 Merge "Add @UnsupportedAppUsage to test apis that are known to be used by apps."
am: a98026f7aa

Change-Id: Ia39fbc2200aa7262e4a05b0710b7a382bb01b276
2019-11-13 10:33:06 -08:00
Artur Satayev
5a525851a8 Add @UnsupportedAppUsage to test apis that are known to be used by apps.
go/testapi-enforcement

Bug: 133832325
Test: m
Change-Id: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
Merged-In: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
2019-11-13 15:05:56 +00:00
Artur Satayev
7a565c45b1 Merge "Add @UnsupportedAppUsage annotations for greylist."
am: 423c3a32d6

Change-Id: I5387b4742fdaf67ad3189356f2361f73969b53a8
2019-11-11 09:13:24 -08:00
Artur Satayev
fc46be7dbd Add @UnsupportedAppUsage annotations for greylist.
go/cleanup-greylist-txt

These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.

Bug: 137350495
Test: m

Change-Id: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09
Merged-In: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09
2019-11-08 16:17:13 +00:00