It's not clear this actually makes much difference on modern
devices/drivers. With updatable graphics drivers, we'd have to be able
to unload the preloaded driver from processes that don't use the
system driver, which is additional complexity and risk.
On bullhead and sailfish, meminfo actually showed slightly more memory
available while sitting at launcher just after boot with this change
than previously. Looking at detailed stats, the differences appeared
to mostly within run-to-run variation, but there wasn't evidence of a
regression.
Bug: 33531483
Test: boot through lockscreen/launcher
Change-Id: I1892302c1750cdbeaf5b9979f8da4dc6bd7b3e75
Merged-In: I1892302c1750cdbeaf5b9979f8da4dc6bd7b3e75
On FBE devices, don't save the metrics to disk but compute them when the
password is first entered and only store them in RAM.
Merged-in: 5daf273b7e
Bug: 32793550
Change-Id: Icee7f615167761177b224b342970a36c7d90f6ba
In some cases (e.g. Android Wear) SystemWindowInsets can be non-zero
due to overscan layout hints even when no SystemUI is present.
This change resepects the overscan flag on input method windows
allowing an IME to opt-out of the navigation bar guard and receive
full-height content view.
BUG: 32700226
Change-Id: Ic38f204a892bf34e8dae65990d5aa8c95af555d8
OEMs can overlay the default 9 dots by providing two drawables that represent
those dots:
* lockscreen_notselected: asset to display when a cell has not been selected.
* lockscreen_selected: asset to display when a cell has been selected.
BUG: 33755663
Change-Id: Ic595b01f5e1321696b7a3feb0ff73c1acccfb942
* changes:
DO NOT MERGE IP Connectivity metrics: add connect() statistics
DO NOT MERGE Fix IP connectivity metrics tests
DO NOT MERGE IP connectivity metrics: introduce ConnectStatistics and DNS statistics
DO NOT MERGE IP connectivity metrics: add transport field.
Swipe to dismiss on dialogs did not dispatch onCancel events
to OnCancelListeners. Resolve by adding listener to monitor
swipe to dismiss events and dispatch onCancel events when
that occurs.
Bug: 33663411
Change-Id: I64ff29e008d485a4559eb3d1ff7f0e74dccff404
When BatteryStats history is too large, the Settings app crashes.
Reset the battery stats by marking an *OVERFLOW* event at the
beginning of the newly reset history.
This seems to happen in Retail mode when the devices are on charger
for an extended period of time and accumulate a sufficiently large
history. Resetting makes sense because the phone is most likely
charged and will reset anyways when unplugged.
Bug: 32540341
Test: Manual
Change-Id: I8c2892458b5d9ce64b1c44aa2e2a000340e71e63
This patch adds a ConnectStats class to aggregate connect() statistics
gathered in NetdEventListenerService. ConnectStats is uploaded once a
day by IpConnectivityMetrics.
Test: $ runtest frameworks-net + new unit test
Bug: 32198976
(cherry picked from commit 4f71a15973f7048076ed10f63d708f020e1a21e0)
Change-Id: I1450c126b90b628d9f1c73ddf054b4742f5e84c5
It looks like one operation was done out of order and some of the times used in
the calculations were leading to incorrect results.
BUG: 31023263
Test: bit FrameworksCoreTests:com.android.internal.os.BatteryStatsDurationTimerTest
Change-Id: I417cc28c5a55748067b6c7f682a66fe3dbc09f09
(cherry picked from commit 47db5a8bf7)
This patch adds a TokenBucket class that can accumulate and distribute
tokens over time.
Test: comes with unit tests.
Bug: 32198637
(cherry picked from commit 998493f0ee)
Change-Id: Iaf477c7bb14f8ddb293b7a907e2ab0cf76d09e07
Modifies swipe-to-close activities to be opaque by default (instead
of translucent by default). Previously, android:noHistory properties
on most activities in Wear were being ignored because they were
usually transitioning to a swipe-to-close activity that was marked
as translucent. This meant that the noHistory activity was still
technically visible, and so would never be culled from the task
history.
Now, we convert a swiped activity to translucent as soon as a swipe
begins, and convert it back after the swipe finishes. The previous
version of SDL tries to do this, but fails in the case where the
context is a ContextWrapper.
This approach is hacky and isn't merge-able into master. We leave
it DO NOT MERGE and will do a long-term fix after the holidays.
Test: Built a test app to verify that noHistory is now being
correctly respected. Manually verified that new activities start
out opaque and not translucent. Manually verified that Home
correctly starts/stops when it's revealed from underneath a
partially swiped activity. Tested general swipe behavior on Settings,
Contacts, Flashlight, Fit.
Bug: 33252029
Change-Id: Ib2e7f21ea1e0d52db03e78d25676501e5f73b31f
Fixes a bug where the max lines restriction was not properly
passed to ImageFloatingTextView's layout, causing the TextView
to improperly apply bottom padding.
Change-Id: Ibe07515866a4599047712a0482332ed4430c9056
Test: runtest -x core/tests/coretests/src/com/android/internal/widget/ImageFloatingTextViewTest.java
Fixes: 32658499
Bug: 32658499
Instead of relying on the window animation system, in the special
case of a swipe-dismiss, disable any default window exit animation
and perform a custom animation. This bypasses some bugs in the
window animator codebase and allows us to have a nice "rebound"
animation if the user doesn't swipe far/fast enough to trigger a
dismiss.
Bug: 33041168
Change-Id: Ied45700d35a59950bacef1ba0650eaa5bc60fadb
The emergency call was not launched in the current user
and therefore was only launching once the user had switched.
Change-Id: If6f3bcf77d88a0658b6e0f91f7e4da5d6264b04f
Fixes: 32424103
Test: manual: switch to secondary user and launch emergency affordance
The emergency call was not launched in the current user
and therefore was only launching once the user had switched.
Change-Id: If6f3bcf77d88a0658b6e0f91f7e4da5d6264b04f
Fixes: 32424103
Test: manual: switch to secondary user and launch emergency affordance
Allows configuring notification and sensor triggers
separately. Introduces a helper class that hosts the
logic for determining what kinds of triggers a device
supports.
Bug: 32073185
Change-Id: Ie7e8eb6b895dcc54e6f972e70642c7248b9e223a
Test: disable "ambient display", sensor triggers should still work
This is a follow up CL to my previous CL [1] that let
IInputConnectionWrapper to call InputContentInfo#requestPermission()
automatically so that temporary URI permissions can be granted
automatically on API 25+ devices whenever
INPUT_CONTENT_GRANT_READ_URI_PERMISSION is specified.
However, in that CL we forgot to handle exceptions thrown from
InputContentInfo#requestPermission(). This is problematic because it is
actually easy for IMEs to cause SecurityException by specifying a
content URI that does not allow grantUriPermission, e.g.:
inputConnection.commitContent(
new InputContentInfo(Uri.parse("content://call_log/test"),
new ClipDescription("test", new String[]{"image/gif"}));
As a result, IMEs can let the application crash at any time because
InputContentInfo#requestPermission() is automatically called inside the
Framework.
This CL makes sure that exceptions thrown from
InputContentInfo#requestPermission() can be handled gracefully.
[1]: Id955435dd2e72549ee7134f46b3c6951581694ad
f3806f57a5
Bug: 32162481
Change-Id: I08916a1f54518390d3b67ab1673dc901e3f9716a
Added a service that listens whether emergency affordances
are necessary.
If the they are needed, it adds an option to the
global actions dialog that directly launches the
emergency call and also adds a long-press listener
to the keyguard emergency button.
Test: adb shell settings put global force_emergency_affordance 1 && adb shell settings put global emergency_affordance_number 111112
Bug: 30404490
Change-Id: Ib96a15da2ef4b568a8d77140ebca6aa6f20f5ddb
The limit is MAX_WAKELOCKS_PER_UID+1, since OverflowArrayMap
will add one more to contain the overflow.
Change-Id: I53004582daa0c405427308816728f2c1d2bef40d
Add the FLAG_RECEIVER_FOREGROUND flag to the broadcast intent
triggered by hardware key.
This prevents the framework from delaying the delivery of the
intent to its recipients, and improves the response for hardware
key event under heavy load on the system.
Bug: 28735973
Change-Id: Ib7f219845be34794f4c7545927e53cc6c2b504a3