Previously, a fixed size buffer was allocated each time a call to
`computeSha256DigestForLargeFile` was made. This causes
undesirable performance issues. This change allocates a buffer
per apex/module-update session instead.
To fix this, that method is amended to take in a buffer passed
in by the caller instead.
To aid in the usage of this API, a new method called
`createLargeFileBuffer` is introduced to help callers allocate
a pre-determined buffer size to be passed into the SHA
computation method based on whether the device is low RAM
device or not.
Subsequent RSS benchmarking shows that this helps to
significantly lower the RSS high watermark (HWM) for
the `system_server` process into just noise.
Bug: 229137737
Test: Manual
Change-Id: I6d2d17353f999bd6cfb937cd5ae6e6925f1353ac
UDFPS position and assets are configured in pixels in native
resolution. This CL adds a mechanism to detect a runtime resolution
change and scale the UDFPS coordinates accordingly.
Bug: 223342274
Test: atest SystemUITests:com.android.systemui.biometrics
Change-Id: Iaa1f3d633b50019d06bdecb5063490ad6eb11272
In current desgin, the confgis for cutout and rounded corner are based
on the original display size. If the display resolution is overridden,
cutous and rounded corners will be drawn in incorrect places with
incorrect size.
We should load the cutout & rounded corners with the orignal display
size and then scale the results with the display ratio which is
calculated by dividing current size with original size.
Bug: 209592558
Test: manual:
1. Go Settings-> Display-> Screen Resolution
2. Switch between FHD+ and QHD+
3. Check if the cutout and rounded corner looks the same as they
are in the original display size.
Test: manual:
1. adb shell wm size 1080x2340
2. Check if the cutout and rounded corner looks the same as they
are in the original display size.
Test: atest DisplayCutoutTest LocalDisplayAdapterTest
ScreenDecorationsTest RoundedCornerResDelegateTest
Change-Id: Iea42b73c0276b82983c1ddbce9455355afdc164d
- Add API in IUserManager to allow setting ephemeral user flag
- Implement and export this API in UserManagerService and UserManager
- Set guest as ephermal by default when createGuest in UserManager is called
- Handle guest user switching in UserSwitcherController for the case
of dynamic change of ephemeral state
- Add persistant notification when in guest mode to indicate
- if guest session is new or previously used.
- if guest session will be cleared on exit or not
- Add buttons in persistant notification to reset or exit guest
- Add flags to enable/disable this feature
Bug: 214031645
Screenshots: go/ephemeral-guest-b-214031645-ux
Test: Manual test using sunfish, atest SystemUITests, atest SettingsRoboTests
Relands ag/16545010 after resolving post submit issues
Revert "Revert "Guest mode updates to resolve privacy concerns in guest mode""
This reverts commit dd5c440802.
Change-Id: I46b8ab527bab8fe665114ed0fffbb06a59d49a77
Merged-In: I46b8ab527bab8fe665114ed0fffbb06a59d49a77
This reverts commit 2e06c6008e.
Reason for revert: fixing the boot time regression
Provides a read-only interface that is used by computer and snapshots.
It fixes the data conflicts when AppsFilter is changed while a snapshot is
taken.
Test: atest AppsFilterTest
Test: atest com.android.server.utils.WatcherTest
Test: m RUN_ERROR_PRONE=true framework services.core |& grep AppsFilter
BUG: 218411030
Change-Id: I06624ea79ff85160488a6c7863213b0c44fe2154
Track pending estimated launch time changes in a single Set so that we
avoid sending repeat notifications for a single package.
Bug: 227796747
Test: atest CtsUsageStatsTestCases:UsageStatsTest
Test: atest FrameworksCoreTests:android.util.SparseSetArrayTest
Test: atest FrameworksMockingServicesTests:PrefetchControllerTest
Test: atest FrameworksMockingServicesTests:UserUsageStatsServiceTest
Change-Id: I671c97e4e4110d0a1c76a8f6400dfe8c1e5055dc
Document a section of code that prevents an NTP-related CTS test working
if the device is not connected to Wifi. The reason the code exists took
a little bit of research, so here it is.
Bug: 213393821
Test: Comment-only change
Change-Id: I0b5d9f298ef36e861f780a29fdf74f0226fa1567
Provides a read-only interface that is used by computer and snapshots.
It fixes the data conflicts when AppsFilter is changed while a snapshot is
taken. This requires a watchable class for SparseSetArray.
Test: atest AppsFilterTest
Test: atest com.android.server.utils.WatcherTest
Test: m RUN_ERROR_PRONE=true framework services.core |& grep AppsFilter
BUG: 218411030
Change-Id: Ib9d13537b6cec911b2a189aea828e9baec650585
* changes:
RESTRICT AUTOMERGE Refactor device policy resource APIs to a separate class
RESTRICT AUTOMERGE move device policy resource APIs to a separate class
RESTRICT AUTOMERGE hide device policy resources constants
Add the ability to configure NTP port for tests via the command line and
the associated plumbing / knock-ons.
In-progress CTS tests will run a fake NTP server on the device itself.
Binding to NTP's default port of 123 is restricted. Therefore, we need
to be able to override the port for tests.
adb shell cmd network_time_update_service set_server_config --port 9999
adb shell dumpsys network_time_update_service
<observe port value>
adb shell cmd network_time_update_service force_refresh
<observe false>
adb shell cmd network_time_update_service set_server_config
adb shell dumpsys network_time_update_service
<observe port value>
adb shell cmd network_time_update_service force_refresh
<observe true>
Bug: 213393821
Test: See above
Change-Id: I21e8b735fab268df0d617848b8a562f86560ad16
Also adds unit tests for TimingsTraceAndSlog.
Test: atest FrameworksMockingCoreTests:TimingsTraceLogTest FrameworksMockingServicesTests:TimingsTraceAndSlogTest
Bug: 223642864
Change-Id: I3a2b259fca7c4fbab08bc4212d850fee3ac2f037
Also some minor wording changes.
Test: Rebuild apk
Bug: 219000314
Change-Id: I9e54bd5f17dd1eb4e0f8803d2c29781a49c1124d
Merged-In: I9e54bd5f17dd1eb4e0f8803d2c29781a49c1124d
Initial command-line interface for NetworkTimeUpdateService for use in
tests.
To be joined by more commands as they are identified.
Bug: 213393821
Test: adb shell cmd network_time_update_service help
Test: adb shell cmd network_time_update_service clear_time
&& adb shell dumpsys network_time_update_service
Test: adb shell cmd network_time_update_service force_refresh
&& adb shell dumpsys network_time_update_service
Change-Id: I033764a7df9759e9fd4da0b0776f6535a574ff59
On low RAM devices, there can be potentially OOM issues when
APEXs are too large, causing large buffers to be allocated when
computing the SHA256 digest of those APEX packages.
This change introduces the usage of DigestInputStream with
different buffer sizes according to the state of device (whether
it is a low ram device or not) to cap the memory usage.
Buffer size is currently derived experimentally at either 1kB or
1MB.
Bug: 217596264
Test: Manual.
Change-Id: I1964ef9d7047496a758c7f427910f116be89fc51