Commit Graph

9670 Commits

Author SHA1 Message Date
Nate Myren
f8dd173528 Merge "Revert sync app op chain changes" into sc-dev am: 50ff5ac8b8 am: 17e6177ea9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15424412

Change-Id: I5081e4f0f78783192f553b74936a15755895e045
2021-08-03 15:52:58 +00:00
Nate Myren
50ff5ac8b8 Merge "Revert sync app op chain changes" into sc-dev 2021-08-03 15:16:35 +00:00
Nate Myren
86c337659a Revert sync app op chain changes
These changes cause some noted app ops to be swallowed due to one-way
app ops.

Fixes: 187721493
Test: atest AppOpsLoggingTest
Change-Id: I3b761b65b2e06138fc1d130bf80587f8885bb1d5
2021-08-02 12:50:44 -07:00
Li Li
69d46fa9b7 Merge "Freezer: fix exception when parsing /proc/locks" into sc-dev am: ef12967b75 am: 57240b0a67
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15395534

Change-Id: I8605df085ec636ea1dba1096076bee5c1d6dd4f4
2021-07-30 17:07:55 +00:00
Li Li
ef12967b75 Merge "Freezer: fix exception when parsing /proc/locks" into sc-dev 2021-07-30 16:35:16 +00:00
Zim
366493edd2 Fix fd leak while bypassing transcoding in media APIs
To call the media service while bypassing transcoding there are 4 file
descriptors involved:

A: The original file descriptor the app owns and is responsible for
closing
B: Dupe of A, to pass into the MediaStore API as an input to receive a
non-transoding fd
C: The output from the MediaStore API
D: Final fd owned by the media service, after C gets duped over binder
as part of setDataSource

We were leaking (B) and (C). Now we close them appropriately.

See I0124ec8fbd0471237e99bab321f903544f8fe1f8 for another 2 fd leak
fix in MediaProvider

Test: atest TranscodeTest
Test: Manual with 'adb shell lsof | grep <filename>'
Bug: 194828489
Bug: 179804072
Change-Id: I978257bbc4a8f6813b6e6a5ce22124257204f432
Merged-In: I978257bbc4a8f6813b6e6a5ce22124257204f432
2021-07-29 22:05:17 +01:00
Zim
eccf1db4f7 Fix fd leak while bypassing transcoding in media APIs
To call the media service while bypassing transcoding there are 4 file
descriptors involved:

A: The original file descriptor the app owns and is responsible for
closing
B: Dupe of A, to pass into the MediaStore API as an input to receive a
non-transoding fd
C: The output from the MediaStore API
D: Final fd owned by the media service, after C gets duped over binder
as part of setDataSource

We were leaking (B) and (C). Now we close them appropriately.

See I0124ec8fbd0471237e99bab321f903544f8fe1f8 for another 2 fd leak
fix in MediaProvider

Test: atest TranscodeTest
Test: Manual with 'adb shell lsof | grep <filename>'
Bug: 194828489
Bug: 179804072
Change-Id: I978257bbc4a8f6813b6e6a5ce22124257204f432
2021-07-29 21:57:57 +01:00
Li Li
bbe06e7b59 Freezer: fix exception when parsing /proc/locks
The original code is based on /proc/locks manpage. Unfortunately, that
manpage is never correctly updated to include the new field for blocked
locks. The new code detects the extra field. As StringTokenizer is too
heavy, ProcFileReader is used for better performance.

Bug: 194756340
Test: FrameworksUtilTests com.android.internal.util.ProcFileReaderTest
Test: FrameworksCoreTests com.android.internal.os.ProcLocksReaderTest
Test: No /proc/locks parsing exception with blocked locks
Change-Id: I4c9763f9d3091f7d84d2e4b672d7e5cb78b33f59
2021-07-29 09:18:53 -07:00
Nandana Dutt
e0a5f0de95 Merge "Note API alternatives in javadoc" into sc-v2-dev am: 138f08b5de am: f8d671f6f1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15390553

Change-Id: I49a1141e2429564a7c00a49ebbc77bfa1abc71a0
2021-07-27 09:06:17 +00:00
Nandana Dutt
f8d671f6f1 Merge "Note API alternatives in javadoc" into sc-v2-dev am: 138f08b5de
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15390553

Change-Id: If7d9fc69b060bb9ff686c153329736f76d7f3063
2021-07-27 08:52:21 +00:00
Tianjie Xu
36bf6a2e8c Merge "Add a system API UpdateEngine to switch the slot back and forth" am: 4eaa49eeb6 am: 7c7696cd47 am: 547296b419 am: ee4e466a09
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1698090

Change-Id: I20516865284f9c4c2fc24e5b28a40a38dcd1a9a0
2021-07-27 03:16:50 +00:00
Tianjie Xu
ee4e466a09 Merge "Add a system API UpdateEngine to switch the slot back and forth" am: 4eaa49eeb6 am: 7c7696cd47 am: 547296b419
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1698090

Change-Id: Ic218ff3aeed857379ef69026f7f29206df70560b
2021-07-27 03:03:22 +00:00
Tianjie Xu
547296b419 Merge "Add a system API UpdateEngine to switch the slot back and forth" am: 4eaa49eeb6 am: 7c7696cd47
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1698090

Change-Id: Iea96fe5411794ca3a95031661edea581c3334b6b
2021-07-27 02:42:21 +00:00
Tianjie Xu
7c7696cd47 Merge "Add a system API UpdateEngine to switch the slot back and forth" am: 4eaa49eeb6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1698090

Change-Id: I60bdebcc482028135dd05979bb50cba5ca656f13
2021-07-27 02:19:18 +00:00
Tianjie Xu
4eaa49eeb6 Merge "Add a system API UpdateEngine to switch the slot back and forth" 2021-07-27 02:03:10 +00:00
Tianjie Xu
a15b3fb07b Merge "Add owner file for UpdateEngine" am: 5c8dce3ada am: 254fd31028 am: 7263582a8e am: a05d2e2076
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1776894

Change-Id: Ifdcb23df42e8e9c9ef8eaf5614ed134136562c4c
2021-07-27 01:59:08 +00:00
Tianjie Xu
a05d2e2076 Merge "Add owner file for UpdateEngine" am: 5c8dce3ada am: 254fd31028 am: 7263582a8e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1776894

Change-Id: I6a04ebc2290d74f4315e70caf710ff2bddc278b4
2021-07-27 01:53:41 +00:00
Tianjie Xu
7263582a8e Merge "Add owner file for UpdateEngine" am: 5c8dce3ada am: 254fd31028
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1776894

Change-Id: Id6adaa0b9a70475d09fd55f5b36ba9782c40d160
2021-07-26 21:49:56 +00:00
Tianjie Xu
254fd31028 Merge "Add owner file for UpdateEngine" am: 5c8dce3ada
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1776894

Change-Id: I55b82fe8a847e94cca9769afbf29ec24cd46a988
2021-07-26 21:33:14 +00:00
TreeHugger Robot
dfa32b6bf0 Merge changes from topic "native_hint" into sc-dev am: ea52c87596 am: 2194851f5c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15326475

Change-Id: If0a6ed03108a1ae793cbba0abcdd78e6331c25b3
2021-07-26 18:52:23 +00:00
Nandana Dutt
f89b637865 Note API alternatives in javadoc
Note alternatives for getExternalStorageDirectory() and
getExternalStoragePublicDirectory()

Change-Id: Ibb7238e0dfc780a88940507aaf1d5cf4103bbee4
BUG: 194164033
Test: treehugger build
2021-07-26 12:30:52 +00:00
Tianjie
dcbd9ea138 Add owner file for UpdateEngine
Test: th
Change-Id: I50c775874cb9ad54f049e415b6fb68ec29d7f1c8
2021-07-23 17:15:43 -07:00
TreeHugger Robot
95e50fed20 Merge "Revert "Add systrace tag for system property"" into sc-dev 2021-07-23 17:04:39 +00:00
TreeHugger Robot
18517e9551 Merge changes from topic "native_hint" into sc-dev am: ea52c87596 am: 9533a3db22
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15326475

Change-Id: If8502e41cbc2cf88b6ed9634741e57f066ab3652
2021-07-22 21:51:12 +00:00
TreeHugger Robot
2194851f5c Merge changes from topic "native_hint" into sc-dev am: ea52c87596
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15326475

Change-Id: I8dde7d37c30d756108b007dd0cf09de057f4b913
2021-07-22 21:33:26 +00:00
Bo Liu
0b2ad9f70d Implement java PerformanceHintManager on top of native
Note some exceptions became silence errors in this conversion.

Test: None
Bug: 194204196
Change-Id: Ia3cc7f2396f2e307a23b40b3f104a2fa90352196
2021-07-22 11:33:13 -04:00
Bowgo Tsai
e169c22053 Revert "Add systrace tag for system property"
Revert "Add systrace tag for system property"

Revert "Adding system property tracing"

Revert submission 1403568-sysprop_trace

Reason for revert: makes property get/set non-reentrant
Reverted Changes:
I6f85f3f52:Add systrace tag for system property
Id2b93acb2:Adding system property tracing
Id78992d23:Add systrace tag for system property
I1ba9fc7bd:Add systrace tag for system property

Bug: 193050299
Change-Id: Iaf522b403e51abcf1d49804f35a184b4aa0d3209
Merged-In: Iaf522b403e51abcf1d49804f35a184b4aa0d3209
Test: build and boot a device
(cherry picked from commit 137d78bb67)
2021-07-22 04:41:03 +00:00
Lee Shombert
1171265b9d Merge changes I68868b7f,I092d1385
* changes:
  Do not cache wildcard users (UserManager)
  Do not cache wildcard users (PackageManager)
2021-07-21 23:07:00 +00:00
TreeHugger Robot
77362426e6 Merge "DropBoxManager: Fix doc build error" into sc-dev am: 019189c35a am: a945369393
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15341836

Change-Id: If40ca51dc06560536eb80bd02adebfaa43b55244
2021-07-21 01:55:52 +00:00
TreeHugger Robot
0829767999 Merge "DropBoxManager: Fix doc build error" into sc-dev am: 019189c35a am: fd0f972819
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15341836

Change-Id: I965e36ca78d4cbc3c1b971012f2e3dad7a771b3f
2021-07-21 01:55:28 +00:00
TreeHugger Robot
a945369393 Merge "DropBoxManager: Fix doc build error" into sc-dev am: 019189c35a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15341836

Change-Id: Iacd649005d0055d9b4b0dd087f0350b128314a9a
2021-07-21 01:40:27 +00:00
TreeHugger Robot
09b6ee6bfd Merge "DropBoxManager: Fix doc build error" into sc-dev am: 019189c35a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15341836

Change-Id: I3c184816f6d17a46eb5f0e67984e2c66e3fb791d
2021-07-21 01:38:59 +00:00
Bowgo Tsai
1241c9b6f2 Revert "Add systrace tag for system property"
Revert "Add systrace tag for system property"

Revert "Adding system property tracing"

Revert submission 1403568-sysprop_trace

Reason for revert: makes property get/set non-reentrant
Reverted Changes:
I6f85f3f52:Add systrace tag for system property
Id2b93acb2:Adding system property tracing
Id78992d23:Add systrace tag for system property
I1ba9fc7bd:Add systrace tag for system property

Bug: 193050299
Change-Id: Iaf522b403e51abcf1d49804f35a184b4aa0d3209
Merged-In: Iaf522b403e51abcf1d49804f35a184b4aa0d3209
Test: build and boot a device
(cherry picked from commit 137d78bb67)
2021-07-21 09:24:29 +08:00
Shuzhen Wang
a00ce4e75f DropBoxManager: Fix doc build error
Test: make doc-comment-check-docs
Bug: 194230402
Change-Id: I38da2bbfbe7ed0a660274ec4d07e2b176a2a7542
2021-07-20 16:14:15 -07:00
Tianjie
fdf7b58a43 Add a system API UpdateEngine to switch the slot back and forth
In some cases, the OTA update want to flip the slot to source
without cancelling the entire update. The functionality was
achieved by ResetStatus(). However ResetStatus() will clean up
the update progress and free up space to support virtual A/B.

Details in http://go/no-virtual-ab-switch-off

Test: build
Bug: 187321613
Change-Id: I2abcf8289f5fd573d2b55fa7004ab4dcd175252f
2021-07-20 15:29:37 -07:00
TreeHugger Robot
7256f792f6 Merge "Revert "Add systrace tag for system property"" into sc-dev-plus-aosp am: bd811a080f am: 7a5beb3219
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15298117

Change-Id: Id1dc82002506babb33255d71e06967f1876315c9
2021-07-20 18:15:59 +00:00
TreeHugger Robot
7a5beb3219 Merge "Revert "Add systrace tag for system property"" into sc-dev-plus-aosp am: bd811a080f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15298117

Change-Id: I084ca8e5ac09465ca7972846ed6c9bda83f090c7
2021-07-20 17:57:16 +00:00
Lee Shombert
f7067b2477 Do not cache wildcard users (UserManager)
Bug: 186778818

PropertyInvalidatedCache queries that contain wildcard user IDs are no
longer cached.  Some simple multi-user tests show that no current
caches use wildcard user IDs, so the change has no effect on
performance.  The bypass() mechanism is used to avoid the cache when
necessary.

Test: atest
 * FrameworksServicesTests:UserManagerServiceCreateProfileTest
Change-Id: I68868b7f4142417d98b101504cb38c829b220e47
2021-07-20 10:53:37 -07:00
TreeHugger Robot
bd811a080f Merge "Revert "Add systrace tag for system property"" into sc-dev-plus-aosp 2021-07-20 16:30:20 +00:00
Treehugger Robot
54c9ff981e Merge "Added Ble scan APIs to BatteryStatsManager" 2021-07-19 15:32:41 +00:00
Remi NGUYEN VAN
8608d0626e Merge "Rename FIRST_SDK_INT to DEVICE_INITIAL_SDK_INT" 2021-07-19 09:47:21 +00:00
Colin Cross
e2907e5906 Merge "Rename VERSION_CODES.T to VERSION_CODES.TIRAMISU" into sc-dev-plus-aosp am: 3a873acfec am: 98f6af0e19
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15304989

Change-Id: Id39862a791e67c9c47c33b9aca5adefd08d428a5
2021-07-16 19:30:25 +00:00
Colin Cross
98f6af0e19 Merge "Rename VERSION_CODES.T to VERSION_CODES.TIRAMISU" into sc-dev-plus-aosp am: 3a873acfec
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15304989

Change-Id: I71bd32519b13efa53456ef1839f5ccb03dc25229
2021-07-16 19:12:15 +00:00
Colin Cross
3a873acfec Merge "Rename VERSION_CODES.T to VERSION_CODES.TIRAMISU" into sc-dev-plus-aosp 2021-07-16 19:02:01 +00:00
Kalesh Singh
6ede05d88e Merge "Add API to get GPU private memory" into sc-dev am: 4b939ccd2f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15266039

Change-Id: If25bd7c69831f3c996dc0a25e200960a99d7d3ef
2021-07-16 01:54:59 +00:00
Colin Cross
936833de0e Rename VERSION_CODES.T to VERSION_CODES.TIRAMISU
Bug: 186121492
Test: m checkbuild
Change-Id: Ic3e542206ae75626fa361333f00de2937ef18a5f
2021-07-15 11:54:37 -07:00
Kalesh Singh
05d0f24586 Merge "Add API to get GPU private memory" into sc-dev am: 4b939ccd2f am: ff0875c231
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15266039

Change-Id: I55950548223f47cddf1d8e23f28c6c54b4078b5e
2021-07-15 17:56:56 +00:00
Kalesh Singh
3d54f68455 Merge "Add API to get GPU private memory" into sc-dev am: 4b939ccd2f am: 7a58d28e3e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15266039

Change-Id: Id3a5194606c0cce5f36376cd3eed27efba0eb578
2021-07-15 17:52:49 +00:00
Kalesh Singh
7a58d28e3e Merge "Add API to get GPU private memory" into sc-dev am: 4b939ccd2f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15266039

Change-Id: I3b3c102a27dd751809bf47ce8d69c339b3456199
2021-07-15 17:38:12 +00:00
Colin Cross
92380ef500 Merge "Add android.os.Build.VERSION_CODES.T" into sc-dev-plus-aosp am: 3e1311a4b4 am: adb28d6357
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15286710

Change-Id: I4c55061aacf62269c985eef6623545986ffd1461
2021-07-15 17:26:01 +00:00