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
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
* changes:
Fixed a bug where the dimmed background could be invisible
Fixed an issue where the inline controls where not usable
Added Emergency affordance feature
Sometimes, makeSingleLayout() can be invoked before layout direction is resolved.
When not resolved, it indents in LTR layout although it should be RTL.
So, to guarantee the exact indenting, we should re-build the text layout
when the layout direction is changed.
Test: manual - Test BigTextStyle notifications with LargeIcon under RTL configurations.
Fixes: 31633875
Change-Id: Idc6c5d7d41632cb9e1b70d9c67c13852e3f25023
Fix a bug where ResolverComparator's results were not consistent for
targets that cross profile boundaries.
Bug: 31640894
Change-Id: Ic6bf9512d2c2eb6f8fb7851e18eb9a347db29755
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
Fixes: 30404490
Change-Id: Ib96a15da2ef4b568a8d77140ebca6aa6f20f5ddb
Sync adapters without an account access cannot run until the
user approves the account access (for the case the account
access is not allowed by other policy such as being singed
with the same cert as the authenticator). If the sync adapter
does not have permission to access the account we ask the
user to grant access and take a note. This CL adds backup
for the explicit user grants.
bug:31162498
Change-Id: I31e3f3d010475352c7c54255ac2d3a2fed4d0c72
Handler has no fewer than three ways by which a message might be
handled:
[1] the msg itself contains a callback (msg.callback.run())
[2] the Handler was instantiated with a Handler.Callback
(mCallback.handleMessage(msg))
[3] the Handler instance was a subclass and could have
overridden handleMessage()
Handler#dispatchMessage() tries to find the correct way to dispatch
a message, check the above in the above order.
Bug: 21859053
Change-Id: I284cf7ace93af167d95d13b297ec42d4bed15992
Attempt to reduce the chances of watchdog killing the system
server if process pss gathering takes too long during heavy load.
Bug: 30896716
Change-Id: I4ed1a15c0c512a8c82842cde74e733d99d887ee0
Before there was a jump-cut when a window that was occluding Keyguard
was going away, leading to an ugly flicker. To fix this, we do the
following.
- Always show windows with FLAG_SHOW_WHEN_LOCKED above lockscreen, even
if they don't "match" the currently occluding app (which is null in the
animation case)
- Move wallpaper behind last window that is not hidden by policy, so the
window doesn't get occluded by the wallpaper.
- Add a flag in the setOccluded call whether to animate or not. SystemUI
then plays a nice animation when it's set.
- Override the animation to always be the animation that happens when we
exit a window which is revealing the wallpaper behind, to make it
consistent with the home screen case.
Fixes: 30829255
Change-Id: Ib3fe20fc9003a0f9f291c974740f044ed8707e75
LinearLayout sets up internal state during onLayout that's missing when
we override onMeasure. Avoid calling super.onMeasure() by re-implementing
onLayout without the internal state dependencies.
Bug: 30494039
Change-Id: I1149517a2fe5f5afdb4125db5e7f573588fea740
BootReceiver was using current build information when reporting
various versions. This was causing A/B devices to report the
wrong build information when reporting crashes since rebooting
a A/B device with a pending OTA would automatically apply the
OTA. (the problem was not seen on devices without A/B due to
booting through recovery to apply the OTA)
Bug: 30594862
Change-Id: I6f52081142e338c822c9135cba48a1f88f4d4bdb
If we return to the lockscreen from a FLAG_SHOW_WHEN_LOCKED activity,
there was an additional black flicker as the wallpaper wasn't shown
for a couple of frames. The issue is that we didn't set the wallpaper
flag again, to fix another flicker with lockscreen wallpapers. Now,
we pass the state whether we currently have a lockscreen wallpaper
and if we don't have one, we immediately set the wallpaper flag
again.
Bug: 30829255
Bug: 30883413
Change-Id: I9faeaa77b98eb02058171ce19cf90b43826ebe9e
This type behaves like a normal TYPE_APPLICATION, except that WM
will always wait for it to be drawn before starting a transition.
WM always waits for TYPE_BASE_APPLICATION (main window), but for
TYPE_APPLICATION, it only waits if the window relayouts to visible
and gets a surface before the main window is drawn. If main window
itself is ready very fast, transition could start without the other
window.
bug: 30830849
Change-Id: Ife71a9812db7c8eba6ee4ead10ce4f31d9e93b40
The summary is supposed to just hold enough data to continue counting
once the device has reset. Since kernel stats reset when the device
resets, and the first update is ignored to account for soft resets where the
kernel continues running, SamplingTimer should not be recording the last value
it saw from /proc/wakelocks in the summary.
Bug:30575302
Change-Id: Ic193bc5af9a0ede514e3abc8146523d7316c47d3
Previously trust agents would be disabled even after one
wrong attempt. Now we wait for the cooldown (usually 5 attempts),
the same as fingerprint.
Also adds a TrustArchive entry of when device policy changes are sent to
trust agents.
Bug: 30037948
Change-Id: I9e284d994ddae45ef66b5b8b601297c63d8ba667
Do not terminate when the system server classpath cannot be
compiled. This can be the case in fallback mode, e.g., when
a device ran out of space.
Bug: 30765660
Change-Id: I3aca3f2f789e2201e4019e1bf04d239ab54b0d3d
This change rolls back functionality added in ag/747748.
The idea was to restore accessibility focus on
configuration changes, but the restoration was happening
too early, which caused ViewRootImpl and the View to
disagree about accessibility focus. This confusion makes
some views unreachable by swiping after a configuration
change.
Bug: 30042251
Change-Id: Iae32b5425a1e7de9a8f5be965feb912fd2d9a0bb
Mitigates an issue where a LevelListDrawable would constantly
be reloaded even if unchanged. To avoid this, small icons are
now only reloaded if they no longer point to the same resource.
Note that StatusBarIconView already has this logic.
Change-Id: I6be436e5cef7b7ca91a28edc413b1aaa0f1007d5
Fixes: 30496073
- Adds a trusted signal from Keyguard to PhoneWindowManager
- Allows PhoneWindowManager to exempt DISMISS_KEYGUARD windows from force hiding
- Allows PhoneWindowManager to dismiss Keyguard while occluded
Bug: 27410215
Change-Id: I3ad490b64a5805b6f3888a9f37fcfbdd0116395e