Commit Graph

9265 Commits

Author SHA1 Message Date
Jeff Sharkey
e6fb6087aa Merge changes from topic "may27-sdk" into sc-dev
* changes:
  Finalize resource IDs; script to help in future.
  platform/frameworks/base/ - S is now 31
2021-06-02 20:11:14 +00:00
Lais Andrade
c0c482736b Remove non-zero amplitude validation for waveforms
The validation does not exist in Android R and is causing apps to start
crashing in S.

The validation for the static API createOneShot was maintained, as it
already existed in previous releases.

Fix: 184890231
Test: VibrationEffectTest
Change-Id: I606c943a35ddd68ccacab76f0047b9a276b5cf28
2021-06-02 12:26:35 +01:00
TreeHugger Robot
1b3424aa94 Merge "Clarify what ignoring battery optimizations means." into sc-dev 2021-06-01 14:39:55 +00:00
Jeff Sharkey
7c5f4337fd platform/frameworks/base/ - S is now 31
Bug: 171506470
Test: Build
Change-Id: I46d4df5f27783a96a58c966b113391ea3bc112cb
2021-06-01 06:48:51 -06:00
TreeHugger Robot
787c2a6d2a Merge "Fix storage directory API docs" into sc-dev 2021-05-27 20:34:54 +00:00
Kweku Adams
b4582d98c5 Clarify what ignoring battery optimizations means.
Add some more definition to what it means to be on the power allowlist.

Bug: 173547576
Test: N/A
Change-Id: I6c6bd3248dc39877e560656e787ef02adf7d279f
2021-05-27 09:22:05 -07:00
Nandana Dutt
3863979df8 Fix storage directory API docs
Android 10 did not support file path operations for apps in
scoped storage. But Android 11 and above do support file path
operations for such apps.

Fix docs for getExternalStorageDirectory() and
getExternalStoragePublicDirectory() to reflect the current level of support.

BUG: 153562415
Test: m docs

Change-Id: I8bc2a4aa266dbbcc391b415e6209ed6e5d56fe97
2021-05-27 15:57:02 +00:00
Jeff Sharkey
14016d39a6 Merge "Revert "Add user privacy sensitivity APIs."" into sc-dev 2021-05-27 11:59:21 +00:00
TreeHugger Robot
03b86cd11f Merge "Add documentation to VibratorManager on foreground/background behavior" into sc-dev 2021-05-26 17:28:52 +00:00
Adam Bookatz
fdf919fbd5 Merge "BatteryUsageStats - use bus end time" into sc-dev 2021-05-26 17:19:47 +00:00
Ytai Ben-tsvi
c53f7a2d41 Merge "Prevent double-closing of native handle in HidlMemory" into sc-dev 2021-05-26 16:41:14 +00:00
Lais Andrade
c76c77393f Add documentation to VibratorManager on foreground/background behavior
Add information to javadocs explaining that apps in background can
only vibrate the device if the given AudioAttributes usage is one of
notification, ringtone or alarm usages.

Bug: 146313440
Test: N/A
Change-Id: Ib0b8401539157f0ce2768aab281f3b23aae38dae
2021-05-26 15:11:11 +01:00
Steven Moreland
5d8ccf7931 Merge "Revert "binder: race condition by parcel finalize"" into sc-dev 2021-05-25 23:19:03 +00:00
Ytai Ben-tsvi
cd77682736 Merge "Proper duping / closing of FileDescriptors" into sc-dev 2021-05-25 21:49:43 +00:00
Steven Moreland
93e9cf4c35 Revert "binder: race condition by parcel finalize"
Revert "binder: race condition by parcel finalize"

Revert submission 1553275-Bug139327211_V5

Reason for revert: causing a different race condition? b/187218964
Reverted Changes:
I9345f4439:binder: race condition by parcel finalize
Ib06e38e22:binder: race condition by parcel finalize

Bug: 187218964

Change-Id: Iebf76febdad5e231c814f1f8de454931cb9352c5
Merged-In: Iebf76febdad5e231c814f1f8de454931cb9352c5
2021-05-25 17:37:42 +00:00
Adam Bookatz
c86b4777e0 BatteryUsageStats - use bus end time
Now that BUS contains an end time and a duration, use
those in the atom instead of estimating them from
the clock time that the request was made.

Bug: 187223764
Test: atest BatteryUsageStatsProtoTests
Change-Id: Ie69d42bfd19c3a0055e96a25ac33c16c0f7d1a3f
2021-05-25 10:27:29 -07:00
Ytai Ben-Tsvi
808e525d57 Prevent double-closing of native handle in HidlMemory
Since the handle wasn't nullified, when the memory is explicitly
closed, the finalizer would attempt to close again, which results in
an exception.

Bug: 189213084
Test: Manual verification of ST use-cases, which uses this.
      Patch sent to partner for verification.
Change-Id: I4ac6bbdd88b3f729a022896adfed00effec48bd8
2021-05-25 08:20:59 -07:00
Ytai Ben-Tsvi
cad4e327bf Proper duping / closing of FileDescriptors
While looking into another bug, I noticed that the file descriptors
do not get properly duped when converting to HidlMemory and that they
aren't explicitly closed when creating a temporary instance of
SharedMemory.

Test: Manual verification of ST functionality, which uses these
      utilities.
Fixes: 188931943
Change-Id: I76322c56c58be5db8f1a40eb20eb3b96552412f9
2021-05-25 08:15:41 -07:00
Patrick Baumann
dff37ee6d2 Merge "Updates OWNERS files" into sc-dev 2021-05-24 18:30:19 +00:00
Soonil Nagarkar
20b934e7db Merge "Update location bypass allowlist" into sc-dev 2021-05-22 04:04:54 +00:00
Patrick Baumann
43628ca24c Updates OWNERS files
Bug: 186864416
Test: Builds
Change-Id: I04dfc5c2c7143825334ebc62742e335b8c889492
2021-05-21 14:13:18 -07:00
Soonil Nagarkar
1ea818347e Update location bypass allowlist
Create a new DeviceConfig entry to replace the prior Settings entry on
which the location ignore settings allowlist is based. This allows us to
allowlist based on attribution tag, and eliminate holes for large
applications.

Test: manual + CTS + GTS
Bug: 187421886
Change-Id: I31e61db79b93e202bd8c66efae1bb5aaf0c88ff5
2021-05-21 09:25:47 -07:00
TreeHugger Robot
e4cc52acce Merge "BatteryUsageStats atom - frameworks/base" into sc-dev 2021-05-21 16:22:42 +00:00
Hai Zhang
1c760def2d Revert "Add user privacy sensitivity APIs."
This reverts commit 56c0aa6573.

Reason for revert: No longer needed.
Bug: 188435815
Test: presubmit
Change-Id: I5403baf2adcf2a3f9a4573a69db125e57f5670c5
2021-05-21 00:03:56 +00:00
Corina Grigoras
b84e828974 Merge "Clarify javadocs about mode to parse file." into sc-dev 2021-05-20 14:10:22 +00:00
Hai Zhang
56c0aa6573 Add user privacy sensitivity APIs.
Bug: 188435815
Test: presubmit
Change-Id: I5925beca072054bec5db86946fc0243ab8f9f17a
2021-05-19 20:39:40 +00:00
Rubin Xu
e25a1b3d91 Merge "Add device admin restrictions for mic/cam toggles" into sc-dev 2021-05-19 18:03:36 +00:00
Steven Moreland
f07675c46c Merge "Parcel: document enforceInterface" into sc-dev 2021-05-19 18:02:16 +00:00
TreeHugger Robot
c5efbf1dba Merge "Add hasExternalControl hidden API to Vibrator" into sc-dev 2021-05-19 12:50:27 +00:00
Steven Moreland
d0c8e40b98 Parcel: document enforceInterface
Bug: 188022639
Test: N/A
Change-Id: I7a40b7ad0353920f0b5bd395cf46c04fd6c2b6e2
2021-05-19 00:47:32 +00:00
Evan Severson
6ab2d13922 Add device admin restrictions for mic/cam toggles
Introduces DISALLOW_CAMERA_TOGGLE and DISALLOW_MICROPHONE_TOGGLE
which are Device Owner restrictions to prevent the user from
turning off global camera & microphone access on a fully-managed
device.

Test: atest DeviceOwnerTest#testSensorToggleRestriction
Test: atest UserRestrictionsTest
Bug: 184927615
Change-Id: I500f1283689497812bd2df606e35abe6d9d91c61
2021-05-18 23:22:38 +01:00
Corina
8cd8c9901d Clarify javadocs about mode to parse file.
Bug: 185900460
Test: atest
Change-Id: I72b743affd9c1c47650c4249e855676203033f5e
2021-05-18 17:17:27 +00:00
Lais Andrade
a8bef3d484 Add hasExternalControl hidden API to Vibrator
This capability will be queried by the AudioManager to be used to define
if the device has haptic playback capabilities.

Fix: 187227888
Test: N/A
Change-Id: Idc046d2fee12b3317db25975b29cf96f5f9c41b3
2021-05-18 13:23:15 +01:00
Gavin Corkery
f8b9d5cd0b Merge "Add per-file bugreporting OWNERS" am: 324a5e53a9 am: 589f728b5a am: b81e3635e3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1706699

Change-Id: Ia50c7f70cf37f42399f3b447f03a4857473e739c
2021-05-14 16:36:47 +00:00
Gavin Corkery
b81e3635e3 Merge "Add per-file bugreporting OWNERS" am: 324a5e53a9 am: 589f728b5a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1706699

Change-Id: I3dfb6041919201ad6129da0d33101c768d471918
2021-05-14 16:20:11 +00:00
Dmitri Plotnikov
c076e7112e Add stats session end timestamp and duration to BatteryUsageStats
Bug: 187223764
Test: atest FrameworksCoreTests:BatteryStatsTests
Change-Id: Iba97050c067cae7945276798273dd328fe040ef9
2021-05-13 11:49:09 -07:00
Adam Bookatz
2f3abb4441 BatteryUsageStats atom - frameworks/base
Writes the BatteryUsageStats atoms.proto atoms
based on the current BatteryUsageStats data in BatteryStats.

Does NOT write the past pre-reset snapshot atoms; that is
an adventure for a future cl.

Bug: 184095105
Test: atest BatteryUsageStatsProtoTests
Test: statsd_testdrive <atomId>
Change-Id: I2fc5a983deb58d7d393c0696db2165b124c94dc2
2021-05-13 11:40:26 -07:00
Gavin Corkery
fbc73d84cd Add per-file bugreporting OWNERS
Test: Builds
Bug: 188024968
Change-Id: Id4cf779314460ce5909ec14c84af063890b0dbca
2021-05-13 14:17:33 +01:00
TreeHugger Robot
9d7540c17e Merge "Atoms.proto PROFILE_CLONE entry" into sc-dev 2021-05-12 22:02:45 +00:00
Lajos Molnar
22ceced5a7 Merge "build: allow MEDIA_PERFORMANCE_CLASS for R" into sc-dev 2021-05-11 23:09:12 +00:00
TreeHugger Robot
de9e6190bf Merge "Remove last learned battery capacity from battery checkin dump" into sc-dev 2021-05-11 19:22:53 +00:00
Adam Bookatz
c1459550a0 Atoms.proto PROFILE_CLONE entry
Test: manual
Bug: 182396009
Change-Id: Iff88619c95483e7bd477f7f2fc62b6a820f6428c
2021-05-11 12:06:15 -07:00
Dmitri Plotnikov
3dfe9e9c8e Remove last learned battery capacity from battery checkin dump
Test: cts-tradefed run cts-dev -m CtsDumpsysHostTestCases -t android.dumpsys.cts.BatteryStatsDumpsysTest
Bug: 187470619
Change-Id: Ide69435651463e9513af2a9c2f3ab1abb8b83382
2021-05-11 10:49:13 -07:00
TreeHugger Robot
e7f4abd086 Merge "Add a UWB subsystem uid" into sc-dev 2021-05-11 17:38:19 +00:00
Anton Hansson
822d0ac2ba Merge "Inline two constants from CorePlatform" am: dbf1544b68 am: e3eefd6d2e am: 833e374197
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1699727

Change-Id: Ibac0caf69f17c8f003a4a197654c176448a9b7b9
2021-05-11 10:48:12 +00:00
Anton Hansson
833e374197 Merge "Inline two constants from CorePlatform" am: dbf1544b68 am: e3eefd6d2e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1699727

Change-Id: Ifa3f8535c1135b5b67fc1fc9cb4f0377be3acd86
2021-05-11 10:29:15 +00:00
Treehugger Robot
f6bb9a2050 Merge "Add back @UnsupportedAppUsage to IS_DEBUGGABLE" am: b369ebee31 am: 6edf32bd8e am: 04b9df477a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1701245

Change-Id: I435f82920ceaf7ebd6d2d4a8f73b0a21a23f28ef
2021-05-11 09:25:56 +00:00
Anton Hansson
dbf1544b68 Merge "Inline two constants from CorePlatform" 2021-05-11 09:00:57 +00:00
Treehugger Robot
04b9df477a Merge "Add back @UnsupportedAppUsage to IS_DEBUGGABLE" am: b369ebee31 am: 6edf32bd8e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1701245

Change-Id: I71cc95dd57f112fba51e41a862deacdbdc1e9b6d
2021-05-11 08:27:17 +00:00
Roshan Pius
f4d57c090d Add a UWB subsystem uid
Bug: 186788640
Bug: 187766150
Test: Compiles
Change-Id: I6b67c2f7243c50c83cb159c50519a318892f6941
Merged-In: I6b67c2f7243c50c83cb159c50519a318892f6941
(cherry picked from commit 3d8a9d18a7)
2021-05-11 04:16:45 +00:00