Commit Graph

7656 Commits

Author SHA1 Message Date
Automerger Merge Worker
5447d1ea07 Rename AppOpsCollector -> OnOpNotedCallback am: 5892a8f7b0 am: d67461e3d1 am: d2bc94c950 am: 4f809fdc79
Change-Id: Ia3946ce877bbd28ce2b78dbcb4ffb8bd95df44a1
2020-03-10 22:25:36 +00:00
Automerger Merge Worker
d2bc94c950 Rename AppOpsCollector -> OnOpNotedCallback am: 5892a8f7b0 am: d67461e3d1
Change-Id: Ifb61d30c779f9bd3e369c9b677907033287ba928
2020-03-10 21:28:27 +00:00
Automerger Merge Worker
d67461e3d1 Rename AppOpsCollector -> OnOpNotedCallback am: 5892a8f7b0
Change-Id: I42fd4209b26050206c7e5d1396ca65d69ea972b8
2020-03-10 21:13:46 +00:00
Philip P. Moltmann
5892a8f7b0 Rename AppOpsCollector -> OnOpNotedCallback
and annotate time values used by this area of code correctly.

Fixes: 150699068
Test: Only renames
Change-Id: Ibd5b08900d6855603e7ce59048587d391a5c5410
2020-03-10 11:50:00 -07:00
Automerger Merge Worker
ef8922990b Merge "Add API for apps to query whether they have All Files Access" into rvc-dev am: f46b9c9656 am: cae4001988
Change-Id: I8704321ac1cd0641dd4648b210b36c3e7c2dfc39
2020-03-10 17:40:59 +00:00
Zimuzo Ezeozue
f46b9c9656 Merge "Add API for apps to query whether they have All Files Access" into rvc-dev 2020-03-10 17:03:16 +00:00
Zimuzo Ezeozue
ffaa9aafc6 Merge "Add API for apps to query whether they have All Files Access" 2020-03-10 15:03:45 +00:00
shafik
8a5754ba77 Add API for apps to query whether they have All Files Access
This is a fix in response to developers' feedback on DP1.
Add Environment API that enables apps to check whether they have All
Files Access special app access. The API encapsulates the actual
mechanics of the check, which are as follows:
    * First check MANAGE_EXTERNAL_STORAGE app-op,
      if it's allowed, return true. If it's denied (ignored or errored),
      return false.
    * If the mode is default, then check for MANAGE_EXTERNAL_STORAGE
      permission, if it's GRANTED (not just declared), then return true,
      else return false.

Also add test.

Test: atest EnvironmentTest # not CTS
Fix: 150115615
Change-Id: I0574827c22960bf8f074313d983f289be7142149
2020-03-10 13:19:45 +00:00
shafik
8187065889 Add API for apps to query whether they have All Files Access
This is a fix in response to developers' feedback on DP1.
Add Environment API that enables apps to check whether they have All
Files Access special app access. The API encapsulates the actual
mechanics of the check, which are as follows:
    * First check MANAGE_EXTERNAL_STORAGE app-op,
      if it's allowed, return true. If it's denied (ignored or errored),
      return false.
    * If the mode is default, then check for MANAGE_EXTERNAL_STORAGE
      permission, if it's GRANTED (not just declared), then return true,
      else return false.

Also add test.

Test: atest EnvironmentTest # not CTS
Fix: 150115615
Merged-In: I0574827c22960bf8f074313d983f289be7142149
Change-Id: I0574827c22960bf8f074313d983f289be7142149
2020-03-10 11:47:56 +00:00
Automerger Merge Worker
7f3a92e738 Merge "Introduce thread-local allowBlocking flag" into rvc-dev am: 2a594c9e64 am: f8353d2653 am: 09c46b77fb am: 1aba901742 am: e9c028b012
Change-Id: I75a9e0e58ab84fe7d1971de48564e0b7bd4e2b0a
2020-03-09 22:01:22 +00:00
Automerger Merge Worker
e9c028b012 Merge "Introduce thread-local allowBlocking flag" into rvc-dev am: 2a594c9e64 am: f8353d2653 am: 09c46b77fb am: 1aba901742
Change-Id: If0c0ff3e10d29903a1e7b29692c764c821bfab87
2020-03-09 21:05:16 +00:00
Automerger Merge Worker
405fe4e8a6 Merge "Introduce thread-local allowBlocking flag" into rvc-dev am: 2a594c9e64 am: f8353d2653
Change-Id: Id7fbdaa4a11001a58894e1999a1dd65f11072be2
2020-03-09 20:33:08 +00:00
Dmitri Plotnikov
2a594c9e64 Merge "Introduce thread-local allowBlocking flag" into rvc-dev 2020-03-09 17:16:18 +00:00
Automerger Merge Worker
aab8fecf7f Merge "Updates based on API council feedback." into rvc-dev am: 16c9fb8c0f am: 02f173032d am: 1a1d3b1334 am: a1b1440454
Change-Id: Iacd522478200cffaab2cb22064f8db6b269499c5
2020-03-08 22:03:04 +00:00
Automerger Merge Worker
02f173032d Merge "Updates based on API council feedback." into rvc-dev am: 16c9fb8c0f
Change-Id: Ie75cfe17f09f5db7d424d921b1408354c224d8b9
2020-03-08 21:08:34 +00:00
Jeff Sharkey
16c9fb8c0f Merge "Updates based on API council feedback." into rvc-dev 2020-03-08 20:59:38 +00:00
Automerger Merge Worker
73a4e26482 Merge "Support PowerHAL AIDL service" into rvc-dev am: 73e2b381f0 am: 3b1ab4d138 am: b1e96ba27e am: d0335d1419
Change-Id: If468f67ffd019b11841fc9eb96eb11fc1e42b321
2020-03-07 23:33:42 +00:00
Automerger Merge Worker
3b1ab4d138 Merge "Support PowerHAL AIDL service" into rvc-dev am: 73e2b381f0
Change-Id: I7d8e696ee742905167013438d1b964aa2bbe0966
2020-03-07 06:47:14 +00:00
Jia-yi Chen
73e2b381f0 Merge "Support PowerHAL AIDL service" into rvc-dev 2020-03-07 06:27:22 +00:00
Jeff Sharkey
f5eebf9fe6 Updates based on API council feedback.
-- Promote generally-useful PFD API to public.
-- Add @WorkerThread annotations.
-- Add docs to explain how AUTHORITY_LEGACY works, and add explicit
START/FINISH_LEGACY_MIGRATION_CALL verbs to communicate progress.
-- Expand docs for createWriteRequest() to explain broader access
that it grants.  Expand all request methods to indicate the action
is fully completed before the result is delivered.
-- Expand docs for new generation fields to explain that version
also needs to be inspected.
-- Explicitly call out why getKindSize() is deprecated, and guide
towards better alternative.

Bug: 148867182, 148403418, 148011561, 147760276
Test: none
Change-Id: I54ff072a752497b6aba153bd4013567c269e5b19
2020-03-06 14:42:00 -07:00
Dmitri Plotnikov
1258084de2 Introduce thread-local allowBlocking flag
Test: see instructions in http://ag/7911739
Fixes: 146675384

Change-Id: I478f2a8c4e4d8d563e5e78f6e103a62fe120191f
2020-03-06 10:23:02 -08:00
Jia-yi Chen
bfd8f1f74d Support PowerHAL AIDL service
Bug: 147840082
Test: Boot & check logs
Change-Id: Iccdaf84053e0974ffb43857aaa2e382d2f1b4a6b
2020-03-06 10:08:30 -08:00
Abhijeet Kaur
4a989379e8 Move Scoped Storage compat flags definition to frameworks/base
Currently the flags definition is in MediaProvider, which is an
apex module (updatable), and the flags values are now used in
frameworks/base as well (non-updatable).

Good to have flags definition in the constant component.

Bug: 150593967
Test: atest ExternalStorageHostTest
Test: atest com.android.providers.media
Test: manual
Change-Id: I0b06c068cb3957a7db8af5e14598724f72122736
2020-03-06 14:24:37 +00:00
Automerger Merge Worker
97903a77f5 Merge "BatteryStatsManager: Address API council feedback" into rvc-dev am: 03a65f1a5e
Change-Id: I450b5a6a346f8092ba0e084b2054d918337876a0
2020-03-06 09:48:08 +00:00
Automerger Merge Worker
26c33b6a44 Merge "Clarify getCallingPid for oneway transactions." am: 26bbd81bd6 am: 79e3174053 am: 8d4c23bca4 am: a6fe68a08d am: 4209c5522a
Change-Id: I6cd2577ce1181040490a1d7fd7d8a57bea1e5357
2020-03-06 07:15:54 +00:00
Automerger Merge Worker
a6fe68a08d Merge "Clarify getCallingPid for oneway transactions." am: 26bbd81bd6 am: 79e3174053 am: 8d4c23bca4
Change-Id: Idac564db1771643b91eb2a3a7278cd83c0210080
2020-03-06 01:01:29 +00:00
Automerger Merge Worker
8d4c23bca4 Merge "Clarify getCallingPid for oneway transactions." am: 26bbd81bd6 am: 79e3174053
Change-Id: I53ae60643905018ecbae910d30b4adb1224fdf03
2020-03-06 00:42:08 +00:00
Yifan Hong
47af8f93b8 Merge "UpdateEngine: fix cleanupAppliedPayload impl" into rvc-dev 2020-03-05 22:57:08 +00:00
Automerger Merge Worker
140558dea1 Merge "BatteryStatsManager: Address API council feedback" into rvc-dev am: 03a65f1a5e am: f0d757ac83 am: eb05d361e8 am: b1502775d4
Change-Id: Ice553b93cceac6e4378c6555e8b733351b458533
2020-03-05 22:12:39 +00:00
Automerger Merge Worker
eb05d361e8 Merge "BatteryStatsManager: Address API council feedback" into rvc-dev am: 03a65f1a5e am: f0d757ac83
Change-Id: Ia4e2ef49db868809239fcede71327fadad9df55c
2020-03-05 21:54:46 +00:00
TreeHugger Robot
03a65f1a5e Merge "BatteryStatsManager: Address API council feedback" into rvc-dev 2020-03-05 21:42:12 +00:00
Steven Moreland
26bbd81bd6 Merge "Clarify getCallingPid for oneway transactions." 2020-03-05 20:48:07 +00:00
Shuo Qian
0162ce5c39 Merge "API Council Feedbacks" 2020-03-05 19:27:06 +00:00
Steven Moreland
61c5f8e68b Clarify getCallingPid for oneway transactions.
Seems this frequent gotcha is not documented here.

Bug: N/A
Test: N/A
Change-Id: Ia186cd8b9945b75b8342b0750713d8667cfef064
2020-03-05 19:20:37 +00:00
Roshan Pius
cdf5744a77 BatteryStatsManager: Address API council feedback
Bug: 144925883
Test: Compiles
Change-Id: Ibdc61769965a97222fdd968084eca71b997e8feb
2020-03-05 10:34:24 -08:00
Automerger Merge Worker
88414f3d1c Merge "UpdateEngine: fix cleanupAppliedPayload impl" am: 54aba47b29 am: a339e2def4 am: 1c9a46675b am: 2ae97bf0f7 am: b0c0106b9a
Change-Id: I259b73055b5cc64e6c572477f11b275c906171f2
2020-03-05 17:40:21 +00:00
Automerger Merge Worker
97bc53472a Merge "remove proxy binder service IIncrementalManager" into rvc-dev am: 130b6bec30 am: 3785a0bca6 am: 5f05460ac1 am: b6d6c285c7
Change-Id: If664d7867f062dc8b7f3c629c745f2334885eb7e
2020-03-05 17:38:40 +00:00
Automerger Merge Worker
1c9a46675b Merge "UpdateEngine: fix cleanupAppliedPayload impl" am: 54aba47b29 am: a339e2def4
Change-Id: Ie524b232ebba3ecdeeceaeddf61468ac7394e1c5
2020-03-05 17:17:13 +00:00
Automerger Merge Worker
a339e2def4 Merge "UpdateEngine: fix cleanupAppliedPayload impl" am: 54aba47b29
Change-Id: I9ff3ddc4dbf17d8d6401fc7c14ee8b16d7aafb2b
2020-03-05 17:00:50 +00:00
Yifan Hong
54aba47b29 Merge "UpdateEngine: fix cleanupAppliedPayload impl" 2020-03-05 16:41:16 +00:00
Abhijeet Kaur
b255011566 Merge "Use compat flags to reflect the current status of legacy storage." 2020-03-05 14:33:23 +00:00
Abhijeet Kaur
f8af82046a Use compat flags to reflect the current status of legacy storage.
Scoped Storage status of an app can be changed by using compat flags,
as apps can chose to opt-in/opt out of Scoped Storage using these flags.
See ag/10406320 for more details.

Update documentation of isExternalStorageLegacy() method.

Remove checks around INSTALL_PACKAGES and OP_REQUEST_INSTALL_PACKAGES as
that does not allow legacy external storage.

Remove check for WRITE_MEDIA_STORAGE as its value is now
reflected by OP_LEGACY_STORAGE (ag/10162772)

Bug: 132649864
Test: atest ExternalStorageHostTest
Test: atest com.android.providers.media
Test: manually using StorageTest app
Change-Id: Id53da8f8783455038bad101e6ac50ba66b595012
2020-03-05 10:09:38 +00:00
Songchun Fan
7f051b5251 remove proxy binder service IIncrementalManager
This is no longer needed because native Incremental Service directly
uses IDataLoaderManager.

BUG: 150406132
Test: atest service.incremental_test
Test: atest PackageManagerShellCommandIncrementalTest
Change-Id: Idbde2988883becbf3eb707d42c0558774a6073e8
2020-03-04 19:50:44 -08:00
Jing Ji
ace43e57b8 Merge "Check the isInUse with the lock held in MessageQueue" 2020-03-05 01:56:09 +00:00
Automerger Merge Worker
627bfca085 Merge "Start process of next activity with top priority in advance" am: efbcd6752d
Change-Id: I8e8dd0f20cd3a783e49468a7657e571812bca3eb
2020-03-04 23:54:10 +00:00
Shuo Qian
dc86120fca API Council Feedbacks
1) Update doc of ACTION_UPDATE_EMERGENCY_NUMBER_DB
2) Add new APIs EXTRA_VERSION and EXTRA_REQUIRED_HASH
3) Rename isDataConnectionEnabled to IsDataConnectionAllowed
4) Format the API documentations with html format
5) Throw errors for shutdownAllRadios, isAnyRadioPoweredOn
6) Modify the doc of TelephonyManager.getEmergencyNumberDbVersion
7) Add UPDATE_CONFIG permission for ACTION_UPDATE_EMERGENCY_NUMBER_DB

Test: Treehugger; Manual made a call; make -j offline-sdk-docs
Bug: 147696692
Bug: 147805285
Bug: 148217670
Bug: 148218347
Change-Id: Idf3dee3de5ebf75ca8b8fbaaf879e69f7ae4b754
2020-03-04 15:14:55 -08:00
Jing Ji
96a6fec4d6 Check the isInUse with the lock held in MessageQueue
Fix a potential race condtion when the same message object
is being enqueued by two threads.

Bug: 150263007
Test: atest android.os.cts.MessageQueueTest
Change-Id: Id79448ba8719479cbdb054f2cdd172fdcbe86d47
2020-03-04 15:09:34 -08:00
Songchun Fan
ecd96c2be4 Merge "make IDataLoaderManager and IDataLoader stable interfaces" into rvc-dev 2020-03-04 22:53:12 +00:00
Yifan Hong
8b0eedf99c UpdateEngine: fix cleanupAppliedPayload impl
IUpdateEngine.cleanupSuccessfulUpdate is now asynchronous with a callback.
Update UpdateEngine.cleanupAppliedPayload accordingly to use the new impl.

Bug: 147696014
Test: apply OTA
Change-Id: I9b308316dcb8e6a507063d3060fed7693da82a19
2020-03-04 11:38:59 -08:00
Songchun Fan
6381d6193e make IDataLoaderManager and IDataLoader stable interfaces
Instead of using Bundle, explicitly specify params when initializing a data loader.

BUG: 150406132
Test: atest PackageManagerShellCommandIncrementalTest
Change-Id: I2f89d3c3ea1058fdbd689da0d5cb801bf4d9a0b4
2020-03-03 21:18:30 -08:00