Commit Graph

6320 Commits

Author SHA1 Message Date
Jeff Sharkey
02aefee533 Merge "Unify media permissions enforcement in framework." 2019-03-26 23:54:22 +00:00
Jeff Sharkey
859856d8d6 Unify media permissions enforcement in framework.
This opens the door to the same consistent logic being shared by
anyone across the OS who wants to enforce storage permissions.

Bug: 126788266
Test: atest --test-mapping packages/apps/MediaProvider
Exempted-From-Owner-Approval: Trivial permissions refactoring
Change-Id: I3107425f8dafa6ba05918bb67c3c0cb5d3899657
2019-03-26 23:54:08 +00:00
Po-Chien Hsueh
d0f5ee6cef Merge "Pass exception detail to API user" 2019-03-26 06:54:19 +00:00
Daniel Rosenberg
3111cff3c7 Merge changes Iba026321,I31690e0b,If991c5b7
* changes:
  Make RescueParty not wipe if checkpointing
  Add Checkpoint's abortChanges
  Add needsCheckpoint
2019-03-25 21:17:09 +00:00
Daniel Rosenberg
8cbd24dda2 Make RescueParty not wipe if checkpointing
If we're checkpointing, we can roll back instead of wiping. If the
update was the problem, we will succeed. Otherwise, RescueParty will
catch the issue again and prompt the wipe later

Test: setprop persist.sys.enable_rescue 1
      Set device to not commit checkpoints
      vdc checkpoint StartCheckpoint 3
      reboot
      adb shell setprop debug.crash_system 1
      adb shell stop
      adb shell start
      Rescue Party causes reboot instead of wipe
      repeat without checkpointing to get wipe
Change-Id: Iba0263214baa7a0c3d5565b4393d03f975d8000a
2019-03-25 21:16:13 +00:00
Daniel Rosenberg
600799b8b4 Add Checkpoint's abortChanges
Test: Call abortChanges from the java side
Change-Id: I31690e0baa11b28fddcb5dd454a77067a60d2590
2019-03-25 21:16:01 +00:00
TreeHugger Robot
4b58630ef2 Merge "Fixed a property naming mismatch." 2019-03-23 09:55:19 +00:00
TreeHugger Robot
66837a62b9 Merge "Code cleanup in ZygoteProcess.java." 2019-03-23 01:18:00 +00:00
Chris Wailes
da5b64e7f2 Fixed a property naming mismatch.
Device configuration properties in ZygoteConfig.java used old names for
certain values.  These name strings have been updated to the correct
values and additional logging has been added to help catch future
issues.

Test: m
Test: boot and check log for USAP messages
Change-Id: I2fb92afe7edd9b1254dd3be659ec5063aa0b8e16
2019-03-22 17:45:28 -07:00
Chris Wailes
6a17f8393e Code cleanup in ZygoteProcess.java.
Generic code cleanup.  Changed access scopes, replaced code with utility
functions, and outlined some code.

Test: m
Test: treehugger
Change-Id: I6d9a827abf88dc30eac611642723d69cb75bb351
2019-03-22 16:13:47 -07:00
Salvador Martinez
13bfe4a789 Merge "Update names of dynamic power saver mode APIs" 2019-03-22 20:52:13 +00:00
TreeHugger Robot
c396d6738c Merge "API review followup: DynamicAndroidClient" 2019-03-22 17:21:39 +00:00
Salvador Martinez
b85a9f8db4 Update names of dynamic power saver mode APIs
There was some confusion caused by the names so this CL
changes them to make the differentiation more clear hopefully.

Test: robotests pass, build runs, functionality of clients intact
Bug: 126944845
Change-Id: I626dd8e38c59fb5c061e4d0fdcf8c81701c459a3
2019-03-22 10:12:42 -07:00
Michael Wright
950bd77fb7 Move TEXT_HANDLE_MOVE and CLOCK_TICK to TEXTURE_TICK.
TEXTURE_TICK is a new constant that is expected to be called repeatedly
in order to simulate a texture effect when a user is interacting with
the device, like with TEXT_HANDLE_MOVE.

Bug: 111461797
Test: Manual
Change-Id: Ia21de3ce1755a908b4bd4fcbdda411864e5b9fe9
2019-03-22 14:38:01 +00:00
Michael Wachenschwanz
6fbea1744a Merge "Add EXTRA_DROPPED_COUNT for ACTION_DROPBOX_ENTRY_ADDED" 2019-03-22 03:20:37 +00:00
TreeHugger Robot
5d15e6e74c Merge "Game Driver Metrics: update meta data naming for driver build time" 2019-03-22 03:04:24 +00:00
Yiwei Zhang
61f8d22aa6 Game Driver Metrics: update meta data naming for driver build time
Bug: 123529932
Test: build, flash and boot.
Change-Id: I74719b748d90c6b6a209647e445a082e85629a82
2019-03-21 16:14:54 -07:00
Michael Wachenschwanz
8b0ee4737a Add EXTRA_DROPPED_COUNT for ACTION_DROPBOX_ENTRY_ADDED
Bug: 119132031
Test: builds
Change-Id: Ia6e67e9221f1cf99c6b7a49856b7e1e7d68272a9
2019-03-21 13:39:49 -07:00
Andrei-Valentin Onea
bb5089fbd9 Merge "Add @UnsupportedAppUsage annotations" 2019-03-21 19:11:51 +00:00
Chad Brubaker
39392304c5 Merge "Add location backed system clock" 2019-03-21 16:23:31 +00:00
Paul Hu
947bc9208f Merge "Fix Automated API Review issues." am: 814bb8f627 am: 69aa833953
am: a6c364d805

Change-Id: I1968eb36c2f4fafd33846ec0f91710c665d936e6
2019-03-21 07:49:37 -07:00
Paul Hu
a6c364d805 Merge "Fix Automated API Review issues." am: 814bb8f627
am: 69aa833953

Change-Id: I29f4cb581574f2542d461de6a0939e58bfc88059
2019-03-21 07:33:48 -07:00
Paul Hu
69aa833953 Merge "Fix Automated API Review issues."
am: 814bb8f627

Change-Id: I9cbe7dc166ec066b8785553f31dc32ea0572be8e
2019-03-21 07:24:16 -07:00
TreeHugger Robot
ba5cb9136c Merge changes from topic "whichless"
* changes:
  BatteryStats remove which - log warnings
  LongSamplingCounter - remove update()
  Remove which from BatteryStats
2019-03-21 14:16:28 +00:00
Paul Hu
814bb8f627 Merge "Fix Automated API Review issues." 2019-03-21 14:11:36 +00:00
Andrei Onea
e30e3928f9 Add @UnsupportedAppUsage annotations
For packages:
  android.companion
  android.filterfw
  android.hardware.camera2.utils
  android.inputmethodservice
  android.net.nsd
  android.os
  android.preference
  android.security.keymaster
  android.service.dreams
  android.telecom
  android.telephony.ims.compat.feature
  android.telephony
  android.util
  android.view.accessibility
  android.media.effect

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I9c2f8347952f3cc65759472b0e1a2717b285e44e
2019-03-21 14:04:57 +00:00
Po-Chien Hsueh
a5bd084a44 Pass exception detail to API user
Per API review, DynamicSystem installation service will also pass
exceptions to users of DynamicSystemClient.

Bug: 126613281
Test: build and run, verified with test app.
Change-Id: I413d6137837eaa968f59550f110da34cea66d4d4
2019-03-21 17:26:09 +08:00
Po-Chien Hsueh
4e908c24ca API review followup: DynamicAndroidClient
Some API changes per API reivew:
- Move DynamicAndroidClient and ~Manager to android.os.image.
- Rename them to DynamicSystemClient and ~Manager.
- Rename permission MANAGE_DYNAMIC_ANDROID to MANAGE_DYNAMIC_SYSTEM
- Corresponding changes in the installation service.
- Corresponding changes in privapp-permissions-platform.xml.
- Add missing annotations.
- Change setOnStatusChangedListener's parameters order.
- Improve documentations.
- Re-generate api/system-current.txt.

Bug: 126613281
Test: adb shell am
Change-Id: Ia920e9ccf6de1dbbd38c52910cb72cb81b9b5b32
2019-03-21 17:25:59 +08:00
paulhu
79b380cfe7 Fix Automated API Review issues.
These API's argument/return value must be marked either @NonNull
or @Nullable.

Bug: 126701148
Bug: 126699090
Bug: 126701058
Bug: 126700772
Bug: 126699941
Bug: 126701299
Bug: 126700007
Bug: 126700900
Test: atest FrameworksNetTests
Change-Id: Id030a9f1116178b96aa3d4614b10969a537b2fc4
2019-03-21 15:16:58 +08:00
Luke Huang
9490fe0a7c Merge "Cleanup NetworkManagementService for Netd commnads binder migrartion" am: 3af01e2f46 am: e374524144
am: e800f7719f

Change-Id: Ib6730d87eeebcd82964feeb96d12c09ae652d0d5
2019-03-20 23:40:30 -07:00
Luke Huang
e800f7719f Merge "Cleanup NetworkManagementService for Netd commnads binder migrartion" am: 3af01e2f46
am: e374524144

Change-Id: Idb5909a8a537ae155a985670cfaf4e993ef3d95d
2019-03-20 23:28:53 -07:00
Luke Huang
e374524144 Merge "Cleanup NetworkManagementService for Netd commnads binder migrartion"
am: 3af01e2f46

Change-Id: I86ca4cab29099b26f797ef6fce94dbb6f5183b90
2019-03-20 23:18:25 -07:00
Daniel Rosenberg
e3a924d234 Add needsCheckpoint
Test: Call needsCheckpoint on java side
Change-Id: If991c5b7902c811943d03412d80cebef9e2eb001
2019-03-21 01:26:46 +00:00
Chad Brubaker
f113333b98 Add location backed system clock
This provides a permissionless way to use the location (e.g. GNSS)
provided time data for more accurate time keeping.

Test: atest LocationManagerTest#testGnssProvidedClock
Bug: 123530510
Change-Id: Ifbc45997868040abbb3e1399a8649911afb0af05
2019-03-20 16:10:08 -07:00
Bookatz
db6d624a19 BatteryStats remove which - log warnings
In ag/6694908, BatteryStats is changed to only support the "which" of
STATS_SINCE_CHARGED. Here, we deal with BatteryStats calls that attempt
to use a different which, logging the event, exiting, and/or just using
STATS_SINCE_CHARGED as applicable.

Test: compiles
Bug: 70892428
Change-Id: Id0e9f863d8b1a5fb7baa770683c0c4ec5880e976
2019-03-20 10:13:58 -07:00
Luke Huang
909b31aaf1 Cleanup NetworkManagementService for Netd commnads binder migrartion
remove dead code used for netd UNIX sokcet

Bug: 65862741
Test: atest NetworkManagementServiceTest FrameworksNetTests
Change-Id: I5db61cb86325b71ac8a8fce7b15dbf569abc5935
2019-03-20 20:02:24 +08:00
Felipe Leme
d828f7acc8 Merge "Document that Bundle.getParcelableXXX() can throw exception when classloader is not set." 2019-03-20 00:08:44 +00:00
Felipe Leme
45d3bfc5ef Document that Bundle.getParcelableXXX() can throw exception when classloader is not set.
Fixes: 128848849
Test: mmm -j frameworks/base/:doc-comment-check-docs

Change-Id: I027176bd0b022ab0d2a45f8a757e7eb7c7665acd
2019-03-19 14:26:57 -07:00
TreeHugger Robot
38f6c84321 Merge "Add API for checking whether a user is restricted." 2019-03-19 17:54:43 +00:00
TreeHugger Robot
0b5d5d58c6 Merge "Add trace points for GraphicsEnvironment setup" 2019-03-19 12:16:19 +00:00
Yiwei Zhang
e6bdc381af Add trace points for GraphicsEnvironment setup
Bug: 126775624
Test: build, flash and boot. Take systrace to verify.
Change-Id: I190f84878fb714acb2cf25dfc5d8b546b3bbd67a
2019-03-18 22:16:42 -07:00
Hai Zhang
7c064caa13 Add API for checking whether a user is restricted.
This is used by the SMS role.

Bug: 124452117
Test: build
Change-Id: I90bb17654e63cda34b3253024836aa9f4dbc2a4f
2019-03-18 18:21:38 -07:00
Mike Ma
99e57c3c40 Remove which from BatteryStats
BatteryStats tracks three "which" states:
STATS_SINCE_CHARGED,
STATS_CURRENT,
STATS_SINCE_UNPLUGGED

However, only STATS_SINCE_CHARGED is really needed; the other two
just take up a lot of unjustifiable RAM. We therefore remove them from
the implementation here.
We also remove mLastTime and mLastCount from Timers and Counters, since
it was always zero anyway.

While the other two "whiches" are left as constants, they are ignored,
and all functions treat any which as STATS_SINCE_CHARGED. In particular,
SystemHealthManager now uses STATS_SINCE_CHARGED, rather than
STATS_SINCE_UNPLUGGED for all of its Battery statistics.

This is adapted from ag/4310406, but slimmed down to just the 'which'
removal parts.

Bug: 70892428
Test: com.android.internal.os.BatteryStatsTests
Change-Id: I86f2743ff30afc15bbaa12c68f3206ea528857a1
2019-03-18 16:17:36 -07:00
Adam Bookatz
484a77d026 Merge "UserManager.getUserName w/ GET_ACCOUNTS_PRIVILEGED" 2019-03-18 16:58:03 +00:00
Andrei-Valentin Onea
abea8411b5 Merge "Add @UnsupportedAppUsage annotations" am: 09426de69d
am: 4bd5774611

Change-Id: Ibf3acf98e452060afa8975b6f91a8921c0032e80
2019-03-18 07:59:22 -07:00
Andrei-Valentin Onea
4bd5774611 Merge "Add @UnsupportedAppUsage annotations"
am: 09426de69d

Change-Id: I8be4fa32c92a5b5ac335bfbfa0a6edffcb881b22
2019-03-18 07:49:55 -07:00
Andrei Onea
dcb67738f6 Add @UnsupportedAppUsage annotations
For packages:
  android.os

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Merged-In: I4ece0a3f37f88fc2508cb965092aed7cabc61819
Change-Id: I0d942254f06c1a355fb906640e223ad34cced6ab
2019-03-18 12:04:18 +00:00
Andrei-Valentin Onea
e3cbf906ee Merge "Add @UnsupportedAppUsage annotations" 2019-03-18 10:56:26 +00:00
Jeff Sharkey
1400382856 Wire up getStorageVolume() for synthetic paths.
When a getStorageVolume(File) call is for a synthetic path backed
by a content:// Uri, translate it and call getStorageVolume(Uri).

Bug: 124700423
Test: manual
Change-Id: I0f0dc4d5c2205e9d602e4ec2b036fb7822ba1e33
2019-03-17 13:12:30 -06:00
Josh Gao
2cc8c8a492 Merge "ParcelFileDescriptor: improve javadoc." am: c4e2b24d87 am: bc7222d46d
am: b578ef38ed

Change-Id: I031c3238d57583bf0d041f00fa33e586d5984316
2019-03-15 20:12:09 -07:00