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
SystemProperties.get() is not particularly fast,
especially if a string is returned. Since ro.* values
are unable to be changed, there's no need to
continously re-query them. Cache the value at
static init time to trivially fix this.
Test: refactoring CL.
Change-Id: Iccb021d3cb2ba3a4a1d0048ddec6811bb7409eec
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
step1: PowerProfile.POWER_WIFI_ACTIVE represents energy consumption(mAh) per hour
devied by 3600, then WIFI_POWER ==> energy consumption(mAh) per second
step2: WIFI_BPS represents 1000000 bit per second
then (double)WIFI_BPS) / 8 ==> 1000000/8 Byte per second
step3: as upload and download, so divided by 2;
then (((double)WIFI_BPS) / 8 / 2048)) ==> 1000000/8/2048 KB per second
==> packet per second (where 1 packet = 2 KB)
so WIFI_POWER / (((double)WIFI_BPS) / 8 / 2048) represents mAh per Packet where 1 packet = 2 K.
when divided by (60*60) again , that make WifiPowerEstimator narrow 3600 times.
Change-Id: Ic055a5145b6dfb1129c8969826329a3024c9e2b6
Signed-off-by: yuanhuihui <yuanhuihui@xiaomi.com>