Commit Graph

8384 Commits

Author SHA1 Message Date
Martijn Coenen
d4e36b6942 Remove calls to remountUid().
These are no-ops with FUSE enabled, so avoid doing needless work.

Bug: 141394269
Test: N/A
Change-Id: Id9f56ff3235cc2746195b4dd6f8f13e0f7cd0f67
2020-10-05 15:54:38 +02:00
Zimuzo Ezeozue
2d9b034fdc Merge "Removed unused mount mode constants" 2020-10-05 12:15:34 +00:00
Zim
c8fe3d2acd Removed unused mount mode constants
Since FUSE in R, there are only 4 mount modes that are used
from IVold.aidl:

REMOUNT_MODE_NONE
REMOUNT_MODE_DEFAULT
REMOUNT_MODE_INSTALLER
REMOUNT_MODE_PASS_THROUGH
REMOUNT_MODE_ANDROID_WRITABLE

Bug: 148454884
Test: Manual
Change-Id: I62b66083f2099b429474872b6f9c7cffb9fb906d
2020-10-05 10:26:14 +01:00
Rick Yiu
2d43e28fef Merge "Revert "Refine documentation for Process.setThreadPriority"" am: fe6160ab9c am: 1cb565ec3c am: 017adb4085 am: 765dbc6b67 am: ac2eaa1729
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1440031

Change-Id: I681c550a8e3ae87db449fd434c95f46c55ea3cb6
2020-10-02 15:08:51 +00:00
Rick Yiu
ac2eaa1729 Merge "Revert "Refine documentation for Process.setThreadPriority"" am: fe6160ab9c am: 1cb565ec3c am: 017adb4085 am: 765dbc6b67
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1440031

Change-Id: If918ed3b7a64bd8e9e3421d4cee2dc82d08117eb
2020-10-02 14:06:33 +00:00
Rick Yiu
765dbc6b67 Merge "Revert "Refine documentation for Process.setThreadPriority"" am: fe6160ab9c am: 1cb565ec3c am: 017adb4085
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1440031

Change-Id: Ib3da013ce94288729a2b2d177fcc4d2345e1af58
2020-10-02 13:47:00 +00:00
Rick Yiu
017adb4085 Merge "Revert "Refine documentation for Process.setThreadPriority"" am: fe6160ab9c am: 1cb565ec3c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1440031

Change-Id: I1715fe8876ad912282114a2d3db531fdfe577655
2020-10-02 13:15:24 +00:00
Rick Yiu
fe6160ab9c Merge "Revert "Refine documentation for Process.setThreadPriority"" 2020-10-02 12:23:53 +00:00
Treehugger Robot
8ed5dc797e Merge "FileBridge: fix fd ownership mismanagement." am: e80c7cb69a am: bc2ef840e1 am: 5cc3eac681 am: 58c615fbaa am: ff31d87058
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1433025

Change-Id: I877dc8e34324a0f4b303d8bb3c8af450dcea341d
2020-10-02 01:11:39 +00:00
Treehugger Robot
f4ce73e3df Merge "Parcel interface token methods @NonNull." am: 403f00bfb8 am: f74b2d4192 am: 008ff2619b am: 92bcee154f am: cf682d9c2e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1444678

Change-Id: Id111b38163356f7b8a7dde7db200059a9b1799d7
2020-10-02 01:10:56 +00:00
Treehugger Robot
ff31d87058 Merge "FileBridge: fix fd ownership mismanagement." am: e80c7cb69a am: bc2ef840e1 am: 5cc3eac681 am: 58c615fbaa
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1433025

Change-Id: I9dcad087714df784820af2b2439478928dfa5555
2020-10-02 01:03:23 +00:00
Treehugger Robot
cf682d9c2e Merge "Parcel interface token methods @NonNull." am: 403f00bfb8 am: f74b2d4192 am: 008ff2619b am: 92bcee154f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1444678

Change-Id: Ie8c367e500572f3cb1cf8817d28141d52b06867e
2020-10-02 01:02:27 +00:00
Treehugger Robot
58c615fbaa Merge "FileBridge: fix fd ownership mismanagement." am: e80c7cb69a am: bc2ef840e1 am: 5cc3eac681
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1433025

Change-Id: Ic3b714e1e80c4a9ced5373f1490d77ce80cd868c
2020-10-02 00:46:23 +00:00
Treehugger Robot
92bcee154f Merge "Parcel interface token methods @NonNull." am: 403f00bfb8 am: f74b2d4192 am: 008ff2619b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1444678

Change-Id: I08fb4d9849f38737528924fdc75944d362f1d9f5
2020-10-02 00:45:23 +00:00
Treehugger Robot
5cc3eac681 Merge "FileBridge: fix fd ownership mismanagement." am: e80c7cb69a am: bc2ef840e1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1433025

Change-Id: I5016af13c2b9ee3032daa345b82f7479a6ba5072
2020-10-02 00:02:19 +00:00
Treehugger Robot
008ff2619b Merge "Parcel interface token methods @NonNull." am: 403f00bfb8 am: f74b2d4192
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1444678

Change-Id: Ie1f7f8707dfda71df646c1363a1a7e238301838d
2020-10-02 00:01:22 +00:00
Treehugger Robot
e80c7cb69a Merge "FileBridge: fix fd ownership mismanagement." 2020-10-01 22:35:55 +00:00
Steven Moreland
414da7912c Parcel interface token methods @NonNull.
These functions have always aborted when there is a null argument
(before, because they used GetStringCritical). Noticed while working
on b/169674485.

Bug: N/A
Test: N/A
Change-Id: Ic24bd26b4c0323fa3ebee78ccf60bbba4627b565
2020-10-01 19:36:14 +00:00
Peiyong Lin
7b446ea75e Merge "Add global settings variables for ANGLE debug." 2020-09-30 02:10:59 +00:00
Peiyong Lin
2d466d0062 Merge "[GraphicsEnvironment] Avoid null access." 2020-09-29 16:02:49 +00:00
Peiyong Lin
c5c17e66ba [GraphicsEnvironment] Avoid null access.
Currently when debug layer apk is not installed, GraphicsEnvironment
logs the message and proceeds, which results in null pointer access
crash when later trying to access primaryAbi. Avoid null access by an
early return statement.

Bug: N/A
Test: specify not installed debug layer apk and no crash
Change-Id: I4f3b86b0a8cfff4fc608b3a59ebf0872db0465ff
2020-09-28 23:17:37 -07:00
TreeHugger Robot
0f3fbe3e9f Merge "Optimize getting time_in_state for threads of system server" 2020-09-28 22:56:24 +00:00
Dmitri Plotnikov
2237efed88 Optimize getting time_in_state for threads of system server
Prior to this change, we would iterate over _all_ UIDs in
the system, select the one for SystemServer and then iterate over
_all_ threads in _all_ processes running under that UID.
This iteration involves reading many directories in /proc and
many files in those directories.

In the new implementation, we only read time_in_state for the
threads in the system server process itself, identifying them by
the PID.  This optimization reduces the cost 5:1 to 8:1 in terms
of CPU time, number of files read and amount of RAM used.

Bug: 167994570
Bug: 163063901

Test: atest FrameworksCoreTests:com.android.internal.os.SystemServerCpuThreadReaderTest
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryStatsTests
Test: atest FrameworksCoreTests:com.android.internal.os.KernelSingleProcessCpuThreadReaderTest
Change-Id: Iaa2eabc9f39999b2867bbffbac93b282cde74165
2020-09-28 15:32:42 -07:00
Peiyong Lin
318ad33061 Add global settings variables for ANGLE debug.
Introduce angle.egl.features to assist ANGLE debugging. The input
contains lists for each opt-in apps. The format is each list of features
is separated by a comma, each feature in each list is separated by a
colon, e.g.  feature1:feature2:feature3,feature1:feature3:feature5

Bug: b/169156341
Test: use adb shell command to verify
Test: atest android.gputools.cts.CtsRootlessGpuDebugHostTest
Test: atest CtsAngleIntegrationHostTestCases
Change-Id: I752047df1c2567b4ebf900c3acb4a965e35dd6c2
2020-09-28 11:45:56 -07:00
Yogisha Dixit
898219f558 Merge "Add a hidden API to check if ambient display is suppressed for a token." 2020-09-28 16:37:28 +00:00
Rick Yiu
b551e63ea7 Revert "Refine documentation for Process.setThreadPriority"
This reverts commit c3648a82f1.

Reason for revert: will cause lock contention

Bug: 139521784
Test: build pass
Change-Id: Ic10951493ec8dda4e5a5adcbd1c3cb3be3b64782
2020-09-27 03:09:54 +00:00
Peiyong Lin
64389beb16 Merge "[GraphicsEnvironment] Minor polish." 2020-09-25 20:06:07 +00:00
Steven Moreland
4be3ece8e5 Merge "ServiceManager: add getDeclaredInstances" am: 9ff2444ba7 am: b1b830369e am: 7ceee368ee am: f5f4344d2f am: 4acdea4cb8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1436518

Change-Id: I0cffc23dc0d96cacd7c546b42391af33f54ada80
2020-09-25 19:52:10 +00:00
Steven Moreland
4acdea4cb8 Merge "ServiceManager: add getDeclaredInstances" am: 9ff2444ba7 am: b1b830369e am: 7ceee368ee am: f5f4344d2f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1436518

Change-Id: I6a8cebfe4e97f916b9411979b6bb2d5099882557
2020-09-25 19:19:47 +00:00
Yogisha Dixit
784b62a517 Add a hidden API to check if ambient display is suppressed for a token.
Added 1 method:
boolean isAmbientDisplaySuppressedForTokenByApp(String token, int appUid)

Context:
The Settings team is working on adding a string to the AOD settings page when ambient display is suppressed by Bedtime mode: b/168790245.

The current PowerManager#isAmbientDisplaySuppressedForToken(String token) method will only work if the calling app is also the app that suppressed the ambient display. That is, if Digital Wellbeing called suppressAmbientDisplay("winddown"), then isAmbientDisplaySuppressedForToken("winddown") will only return true for Digital Wellbeing. It will return false for Settings app

This CL adds a hidden API PowerManager#isAmbientDisplaySuppressedForTokenByApp(String token, int appUid) that will return true if the given app is suppressing ambient display with the given token. Settings can then call isAmbientDisplaySuppressedForTokenByApp("winddown", digitalWellbeingUid) to get whether ambient display is suppressed by Bedtime mode.

Test: atest FrameworksServicesTests:PowerManagerServiceTest
Bug: 169241595
Change-Id: I41aecc4ff0ab159d67e62193af27362a96c3174c
2020-09-25 20:13:43 +01:00
Steven Moreland
f5f4344d2f Merge "ServiceManager: add getDeclaredInstances" am: 9ff2444ba7 am: b1b830369e am: 7ceee368ee
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1436518

Change-Id: I7755509b329914c491a205f843e731694b02ce84
2020-09-25 19:09:52 +00:00
Steven Moreland
7ceee368ee Merge "ServiceManager: add getDeclaredInstances" am: 9ff2444ba7 am: b1b830369e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1436518

Change-Id: I7c8d6058ac7fc4434870d808325823fdc7972c19
2020-09-25 18:52:01 +00:00
Steven Moreland
9ff2444ba7 Merge "ServiceManager: add getDeclaredInstances" 2020-09-25 18:25:55 +00:00
Peiyong Lin
dacef1a9fe [GraphicsEnvironment] Minor polish.
Log more information to assist debugging without having to rebuild the
system image. Adjust ANGLE related properties.

Bug: b/169156341
Test: atest android.gputools.cts.CtsRootlessGpuDebugHostTest
Test: atest CtsAngleIntegrationHostTestCases
Change-Id: I30b0056d42d30ccadc72fd642068c3aa66592a5c
2020-09-25 10:38:11 -07:00
Treehugger Robot
ec0846ea9e Merge "Fix unique identifiers best practices links in device ID API docs" am: 8b6aa74d6b am: 1d8a35f66e am: 33035121fd am: 3c6a3316b0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1438023

Change-Id: I966b630eb1635094ab12eebe3c34f994579bcbc5
2020-09-25 07:46:39 +00:00
Treehugger Robot
3c6a3316b0 Merge "Fix unique identifiers best practices links in device ID API docs" am: 8b6aa74d6b am: 1d8a35f66e am: 33035121fd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1438023

Change-Id: Iab0aeedf19911857e475ddb8efac6a2fffb4dc76
2020-09-25 07:27:18 +00:00
Treehugger Robot
33035121fd Merge "Fix unique identifiers best practices links in device ID API docs" am: 8b6aa74d6b am: 1d8a35f66e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1438023

Change-Id: If225d991796eebcb2fc37bc1451991f92fa3eed0
2020-09-25 07:10:58 +00:00
Treehugger Robot
8b6aa74d6b Merge "Fix unique identifiers best practices links in device ID API docs" 2020-09-25 04:32:42 +00:00
Michael Groover
a73539128d Fix unique identifiers best practices links in device ID API docs
Bug: 168447060
Test: m docs
Change-Id: I483e0cf4915862254461200deb5d3dc7302bafb4
Merged-In: I483e0cf4915862254461200deb5d3dc7302bafb4
2020-09-24 17:36:32 -07:00
Michael Groover
11be5c6214 Merge "Fix unique identifiers best practices links in device ID API docs" 2020-09-24 18:35:36 +00:00
TreeHugger Robot
ce91a73a7d Merge "Create IVibratorManagerService.aidl" 2020-09-24 17:29:39 +00:00
Steven Moreland
d243d23f84 ServiceManager: add getDeclaredInstances
Corresponding to change in IServiceManager API, for finding out what
instances of a VINTF service are installed.

Bug: 168715768
Test: manual
Change-Id: Ic54b0cfd1bd42e45dc66858dbd614db7ba22083f
2020-09-24 00:46:56 +00:00
Suren Baghdasaryan
3c71366c43 Merge "Report ION usage event when ION heap size is 0" am: 7687adc00d am: d493ed705b am: da855f3363 am: 29711d8cba am: 2042c9c32a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1431373

Change-Id: I6cd8918f799160020d3f9b0577671dc3632d386e
2020-09-23 20:29:44 +00:00
Suren Baghdasaryan
2042c9c32a Merge "Report ION usage event when ION heap size is 0" am: 7687adc00d am: d493ed705b am: da855f3363 am: 29711d8cba
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1431373

Change-Id: Ie65b8fbe70a82f4d00d2fb2dc824372329e3acb1
2020-09-23 20:20:06 +00:00
Suren Baghdasaryan
29711d8cba Merge "Report ION usage event when ION heap size is 0" am: 7687adc00d am: d493ed705b am: da855f3363
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1431373

Change-Id: I0abb5aebd750732e01a101cce8b9a7f80ebd9d51
2020-09-23 20:03:14 +00:00
Suren Baghdasaryan
da855f3363 Merge "Report ION usage event when ION heap size is 0" am: 7687adc00d am: d493ed705b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1431373

Change-Id: I11cfef78933c1978919b6e85bc0ebf817993d73a
2020-09-23 18:25:44 +00:00
Suren Baghdasaryan
193da6e642 Report ION usage event when ION heap size is 0
In a situation when ION heap size is 0 dumpsys meminfo will not report
ION memory usage. Fix this by differentiating 0-size ION heap or pool
from the cases when /sys/kernel/ion/* do not exist or not readable.

Bug: 168942451
Test: emulate 0-size ION heap and run dumpsys meminfo
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I66624c9e3c73a59462cce8830a36323677db0029
2020-09-23 16:09:08 +00:00
Michael Groover
17b4bbd270 Fix unique identifiers best practices links in device ID API docs
Bug: 168447060
Test: m docs
Change-Id: I483e0cf4915862254461200deb5d3dc7302bafb4
2020-09-21 15:27:52 -07:00
Josh Gao
4c392e8057 FileBridge: fix fd ownership mismanagement.
This patch switches everything over to ParcelFileDescriptor, but the
important part of the change is changing FileBridge.getClientSocket to
return a ParcelFileDescriptor. Previously, it returned a raw
FileDescriptor that was closed by FileBridge, and the only non-test
caller of that function was taking it and constructing a
ParcelFileDescriptor from it, which would also attempt to close the fd,
leading to an fdsan abort.

Bug: http://b/162811367
Test: atest FileBridgeTest
Test: treehugger
Change-Id: I724ea7601bb072c98895f68abc08bb0e339d1db0
2020-09-21 14:47:56 -07:00
Alex Buynytskyy
b39d13ed7f Installer digests for Incremental installations.
Bug: 160605420
Test: atest ChecksumsTest
Change-Id: I9d46c218cccf87781e9b33711c4d02d94bf824f5
2020-09-21 12:40:56 -07:00