Ongoing notifications can now be colorized.
This will use the color provided as the background
and invert most text colors
Test: runtest -x cts/tests/app/src/android/app/cts/NotificationTest.java
Bug: 34469375
Change-Id: I818e8db96c868d8bcde8f28c253efd581eeccaa2
Without this, the mocked version looks like it's calling
the default implementation (which immediately fails due to
a bunch of null fields) - with this it just returns null.
I would ultimately like to stop mocking out the controller
and instead use a mocked package manager (which there is
already some set up to do). But in the meanwhile, this at least
gets the test passing.
Test: Checked the test passes.
Change-Id: I92d1f2796cfce21bf55e927bd56690c582f41e91
If the volume long-press listener is set, the listener will receive
the volume key long-presses instead of chaging the volume.
Privileged app needs permission
android.permission.SET_VOLUME_KEY_LONG_PRESS_LISTENER to set the listener.
Bug: 30125811
Change-Id: I5e8fafbb950e5e11522da0f14004648d0877bf3e
Add infrastructure and first sets of unit tests for LockSettingsService
Bug: 33126408
Test: runtest frameworks-services -c com.android.server.LockSettingsServiceTests
Change-Id: I4f3b7f6eaef7122f72b06bd11ce49134a093fe35
It turns out that ImeSubtypeListItem#compareTo() does not satisfy the
contract of Comparable#compareTo(), which can trigger
IllegalArgumentException from Collections.sort() depending on the
runtime condition.
This CL makes it clear that two instances of ImeSubtypeListItem will be
compared with with those fileds in the following order.
1. ImeSubtypeListItem#mImeName
2. ImeSubtypeListItem#mSubtypeName
3. ImeSubtypeListItem#mIsSystemLocale
4. ImeSubtypeListItem#mIsSystemLanguage
Bug: 34255739
Test: adb shell am instrument -w -e class com.android.internal.inputmethod.InputMethodSubtypeSwitchingControllerTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I47f902cc8f5873926d238c30e462d08d7dbebcf7
mDevicePolicyManager field can be null if getDevicePolicyManager()
is never called. A previous refactor removed an apparent unused call
to getDevicePolicyManager(), leading to NPE when mDevicePolicyManager
is accessed. We should always use getDevicePolicyManager() to access
DevicePolicyManager instance.
Test: manual
Bug: 34612758
Change-Id: Ic964b4ee4e3c56301295b8f0629bd005c732c5c4
This is a preparation CL for Bug 32343335.
This CL basically addresses the concern raised in a previous CL [1]
that added several synchnonized blocks in the constructor of
InputMethodManagerService (IMMS).
After hours of code reading and investigation, it is concluded to be
safe IMMS to behave as if there was no IME available until
SystemService.PHASE_ACTIVITY_MANAGER_READY phase. This allows IMMS to
register callbacks not in the constructor but in the later phase to
addresses the concern that object references to IMMS could be leaked
into different threads before IMMS object is properly constructed.
As far as performance is concerned, basically the amount of tasks
to be done in the main thread remains same, or could be reduced a bit
if some unnecessary callback events were skipped. To confirm this, we
can check the total number of the following performance metrics.
- StartInputMethodManagerLifecycle
- StartActivityManagerReadyPhase
[1]: I9d4d3d7232c984432185c10c13fb726a6158cac8
8f202f82fd86a3b40bc5e7d62779eddff21096b1
Bug: 32343335
Test: Manual: pre-installed IME on Direct-Boot disabled device
Test: Manual: pre-installed IME on Direct-Boot enabled device
Test: Manual: user-installed IME on Direct-Boot enabled device
Test: Manual: user-installed IME on Direct-Boot disabled device
Test: Manual: user switching scenario on Direct-Boot enabled device
Test: Manual: user switching scenario on Direct-Boot disabled device
Test: Manual: device unlocking scenario on Direct-Boot enabled device
Change-Id: I5b37c450db4b25b3e635b6d634293a34eec8b9d4
This change creates a new FontManagerService, in charge of providing
font management data. It exposes a public API to retrieve the
information in fonts.xml without accessing it directly. To do this,
it also refactors FontListParser's internal classes into a new public
FontConfig class holding all the font data.
getSystemFonts() returns all the available information in fonts.xml
as well as file descriptors for all the fonts. This allows us to
share the memory consumed by these files between all clients.
Bug: 34190490
Test: See attached CTS change in topic
Change-Id: I0e922f8bcc9a197a1988d04071eb485328d66fb7
Test: Manually tested onDeviceUnlockLockout being called with an actual
TestAgentService implementation.
Notes:
- Active Trust Agents are no longer killed/unbinded from when a temporary
device lockout occurs. Instead, the onDeviceUnlockLockout callback of
the agent is called.
Change-Id: Ifa0984d1d7e5153568334d736e9ebd5a00ef1297
Bug: 34198873
Preloading EGL in Zygote was originally a memory footprint
optimization, but it turns out to be an important app startup time
optimization as well. Preloading EGL in Zygote is incompatible with
updatable graphics drivers, but we don't want to do it on-demand as
part of drawing the first frame either, since that increases
first-frame latency unacceptably.
This change removes Zygote preload, and instead loads EGL on a
low-priority background thread immediately after choosing which
graphics driver to use. This means it is usually done well before
drawing the first frame, without significantly disrupting other
activity launch work.
Test: observe systrace of Calculator launch on bullhead
Bug: 34404021
Change-Id: I887aa09bd35b088b16f53a89838a0c7c98f15761
Instead of
(current charge) * (current battery level percentage)
the formula should be
(current charge) / (current battery level percentage)
to estimate the charge at 100% battery level.
Bug: 34255953
Fixes: 34255953
Test: formula change CL. No existing unit tests found.
Change-Id: I56ef7af3fb097a3082e0ef24329f522d2a0229cc
There is a known issue in the kernel uidcputime module that triggers
the WTF, which has a cost to the system. Convert to a regular log
instead.
Bug:28950306
Change-Id: I7cbb3138f644075f0d9d65ce8b52bd835eb270fd
(cherry picked from commit 82a4d6f93b)
Network usage is tracked by the kernel at the UID level, which is
granular enough for normal apps, but large components (such as the
system server) are impossible to debug without adding additional
socket tagging to help identify subsystems within a UID.
To help ensure that system components tag all their network traffic,
this change offers a new StrictMode option to detect and report
untagged sockets.
Test: builds, boots, all common traffic tagged
Bug: 30943431, 30414041
Change-Id: I825c7941076054732264690247de2863342638e2
Apps that target O+ are always subject to background restrictions.
Legacy apps' background restriction is subject to the OP_RUN_IN_BACKGROUND
app op.
Apps with these properties are exempted from background restrictions:
- persistent process
- currently on the idle battery whitelist
- global whitelist for things like bluetooth services
Bug 30953212
Change-Id: Icc19b2fbc05f40dcf8c3fc4abf718c373dc8d4f6
- When dragging slightly offscreen to minimize the PIP,
ensure that the bounds take the insets into account so
that the user can still interact with the PIP.
Test: Enter PIP in landscape, try to minimize it.
Change-Id: I093a37ba600722d44e50cc68dac77365a2ba062e
Add parallel logs using the new format for the old MetricsLogger
calls. Deduplicate these after the new reader implementation is
complete.
Test: ./vendor/google/tools/systemui/systemui_test_cookbook.sh
Change-Id: If12e1b66b0ec5ac23bd65e44df4f3c6d6931e722
The CL:
* Adds StorageManager#openProxyFileDescriptor API.
* Turns IProxyFileDescriptorCallback into a class so that it can provides
default implementations.
* Removes mActive state from FuseAppLoop, because the state will be managed at
the MountService side.
* Adds StorageManagerIntegrationTest to check if FUSE is correctly mounted or
not. Since it's implementation details, CTS does not help to test the
behavior.
Test: StorageManagerIntegrationTest
Bug: 29970149
Change-Id: Id78dd4abcf9325820e9c77c264f54bfa77b85a92
Test: manual shared images in Photos; webpages in Chrome; contacts in
Contacts, and ran unit tests.
Change-Id: If8c724a4085f1436b3e1e5d62754c6563f756915
Apps that target O+ are always subject to background restrictions.
Legacy apps' background restriction is subject to the OP_RUN_IN_BACKGROUND
app op.
Apps with these properties are exempted from background restrictions:
- persistent process
- currently on the idle battery whitelist
- global whitelist for things like bluetooth services
Bug 30953212
Change-Id: Ib444829a2d222125f64ff19e8218823fa78373f9