Commit Graph

20943 Commits

Author SHA1 Message Date
Charles Chen
235a0bf9bd Merge changes from topic "ime_migration" into sc-v2-dev
* changes:
  Move IME log to WindowTokenClient
  Migrate InputMethodService to WindowProviderService
2021-06-21 08:46:33 +00:00
Charles Chen
41fc06529b Merge "Handle WindowProviderService#onConfigurationChanged" into sc-v2-dev 2021-06-18 06:37:49 +00:00
Charles Chen
79cb3c5288 Move IME log to WindowTokenClient
IMF has the requirement to debug if the configuration is dispatched
to InputMethodService. Since we migrated InputMethodService to
WindowProviderService, we should also move the debug logic to
WindowContext module because config updates will be no longer from
ActivityThread.

Test: build & run
Bug: 135719017
Change-Id: I248c90f36249a6a4537228f7b0204f0d4466ebc7
2021-06-18 11:45:05 +08:00
Charles Chen
fc7a1b5b34 Migrate InputMethodService to WindowProviderService
Also introduce IWindowManager#getDisplayIdToLaunchIme to make IMS
be aware of the launched display to prevent extra onConfigurationChanged
callback

Bug: 149463653
Test: atest MultiDisplaySystemDecorationTests CtsInputMethodTestCases
Test: atest ContextTest ContextIsUiContextTest
Test: manual - moving IME between 2 displays and displayArea within
      display - config change received
Test: manual - the app to show IME crashed and focus is set to the
      next task - no config change

Change-Id: Ie565e30ed5dd3f2cfe27355a6dded76dc3adc14b
2021-06-18 11:44:30 +08:00
Charles Chen
0a3126f408 Handle WindowProviderService#onConfigurationChanged
This CL makes WindowProviderService receive onConfigurationChanged
callback when there's a config update from WM side.

Test: atest WindowContextTests
Test: atest ActivityThreadTest ActivityClientTest ConfigurationHelperTest
fixes: 185766946

Change-Id: I922d52c1c38aecc1a948c79039cc03354adc646f
2021-06-18 11:44:20 +08:00
Julia Reynolds
3cc6d05598 Merge "Store DND rule owners" into sc-dev am: 6b1067a79f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15002286

Change-Id: I2dcd420ebcb74aaba93230df93ae02f0aa9415c8
2021-06-17 19:42:14 +00:00
Julia Reynolds
6b1067a79f Merge "Store DND rule owners" into sc-dev 2021-06-17 19:34:43 +00:00
Felipe Leme
4a412662ff Merge "Split DevicePolicyManagerInternal into DevicePolicyManagerLiteInternal." into sc-dev am: 60ec24eb1e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14948897

Change-Id: I8481a2aff98667c0af9cfbf8325a19c15b72d9f7
2021-06-17 00:31:33 +00:00
Felipe Leme
60ec24eb1e Merge "Split DevicePolicyManagerInternal into DevicePolicyManagerLiteInternal." into sc-dev 2021-06-17 00:03:24 +00:00
Humza Azam
42b5526aa2 Merge "Revert "Revert "Revert "HULK SMASH! We've gotta declare REL."""" into sc-dev am: 83f88bc43a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14994638

Change-Id: I34aeb3bf6e279e6fe7c577f97ae55cb34b0e373b
2021-06-16 22:05:44 +00:00
Humza Azam
83f88bc43a Merge "Revert "Revert "Revert "HULK SMASH! We've gotta declare REL."""" into sc-dev 2021-06-16 22:03:08 +00:00
Humza Azam
32eef1d580 Revert "Revert "Revert "HULK SMASH! We've gotta declare REL."""
This reverts commit 67f28e7448.

Reason for revert: Testing fix for b/191191441

Bug: 191191441
Change-Id: I15ca686c7c44626b734ba45e785adbe66fcf624a
2021-06-16 20:51:30 +00:00
Julia Reynolds
7c9ab2d361 Store DND rule owners
Test: uiservicestest, cts
Fixes: 189332346

Change-Id: Ie546c15c25fcbd193b67cb997220f075691e9bab
2021-06-16 15:55:36 -04:00
Felipe Leme
43dc489afd Split DevicePolicyManagerInternal into DevicePolicyManagerLiteInternal.
DevicePolicyManagerInternal is not set when the device doesn't have
the device_admin feature, but some methods are still needed in that
scenario (like notifyUnsafeOperationStateChanged() on automotive).

Fixes: 190395562

Test: manual verification
Test: atest FrameworksServicesTests:DevicePolicyManagerTest FrameworksServicesTests:DevicePolicyManagerServiceMigrationTest

Change-Id: I48271b828ff01c4e4f3e0365410a7a745f1b0a1d
2021-06-16 08:57:50 -07:00
Issei Suzuki
4d6457de07 Merge "Persist Theme name instead of ID for ShortcutInfo" into sc-dev am: 41e7f367ed
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14783472

Change-Id: Ibb817ece35b04b57f56880091f463689b16beb89
2021-06-16 15:18:23 +00:00
Issei Suzuki
41e7f367ed Merge "Persist Theme name instead of ID for ShortcutInfo" into sc-dev 2021-06-16 14:57:36 +00:00
Colin Cross
9c00e6e8cd Merge "Revert "Revert "HULK SMASH! We've gotta declare REL.""" into sc-dev am: 5c80e3491d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14991077

Change-Id: Ib0f71f6a4dd6418c8c7f92c8144f37ec4d0f4051
2021-06-16 04:05:40 +00:00
Colin Cross
5c80e3491d Merge "Revert "Revert "HULK SMASH! We've gotta declare REL.""" into sc-dev 2021-06-16 01:55:36 +00:00
Colin Cross
67f28e7448 Revert "Revert "HULK SMASH! We've gotta declare REL.""
This reverts commit 30bb1d09eb.

Reason for revert: b/191191441

Bug: 171506470
Bug: 191191441
Change-Id: I698709a27f3b09e5e02143efd7a71157b5ecf75a
2021-06-16 01:54:59 +00:00
Jeff Sharkey
a204ce35fb Merge "Revert "HULK SMASH! We've gotta declare REL."" into sc-dev am: a56beb126d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14973563

Change-Id: I40aa288800c21763fd59acf25c7951297e7060bd
2021-06-15 21:36:21 +00:00
Jeff Sharkey
a56beb126d Merge "Revert "HULK SMASH! We've gotta declare REL."" into sc-dev 2021-06-15 21:03:41 +00:00
TreeHugger Robot
c055f17849 Merge "Update docs for onBackPressed" into sc-dev am: 1e40e4068d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14908762

Change-Id: Icdabc49d75823d5be4ef42ad2f84fc79b3f5e2a2
2021-06-15 18:52:45 +00:00
TreeHugger Robot
1e40e4068d Merge "Update docs for onBackPressed" into sc-dev 2021-06-15 18:33:01 +00:00
TreeHugger Robot
1d5cb87d5e Merge "Fix: query TYPE_WIFI usage with empty string" into sc-dev am: 750ed6aa97
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14972850

Change-Id: I5847e6b42f437c0da8d8a201265a7694af1eb7c2
2021-06-15 04:56:49 +00:00
TreeHugger Robot
750ed6aa97 Merge "Fix: query TYPE_WIFI usage with empty string" into sc-dev 2021-06-15 04:41:22 +00:00
Jeff Sharkey
30bb1d09eb Revert "HULK SMASH! We've gotta declare REL."
This reverts commit 90153d67e0.

Reason for revert: Temporary fix no longer needed; this was only added until an updated prebuilt for the referenced package was merged
Bug: 171506470
Test: none

Change-Id: Ibd3fec1d2ecd505693b4cf89ee8323eb8a50a604
2021-06-15 03:57:02 +00:00
Jeff Sharkey
8374bdcf06 Merge "HULK SMASH! We've gotta declare REL." into sc-dev am: 2a75262a96
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14966105

Change-Id: I18242ad09ff684c652b885db8beb705286f12f48
2021-06-15 03:55:52 +00:00
Jeff Sharkey
2a75262a96 Merge "HULK SMASH! We've gotta declare REL." into sc-dev 2021-06-15 03:51:43 +00:00
Les Lee
913037cba0 Fix: query TYPE_WIFI usage with empty string
Starting with API level 31, the subscriberId is applicable
for the wifi network. Considering applications may use
null or an empty string as subscriberId (for instance, cts),
frameworks create MATCH_WIFI_WILDCARD NetworkTemplate when querying
wifi network with null or an empty string which is the behavior before
API level 31.

Bug: 188915450
Test: atest -c NetworkStatsManagerTest
Test: atest -c NetworkUsageStatsTest
Merged-In: I084b69903f8ba7a6225b312560752e8508938714
Change-Id: I084b69903f8ba7a6225b312560752e8508938714
2021-06-15 10:52:49 +08:00
TreeHugger Robot
a3bbe5e654 Merge "Handle exact alarm permission state changes" into sc-dev am: cd140900ed
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14922432

Change-Id: I2addb59237d412f31c66ad1f3006d83784b8c71e
2021-06-14 21:54:16 +00:00
TreeHugger Robot
d68e4d13d9 Merge "Register the DexLoadReporter before creating the main class loader" into sc-dev am: c03205e2dc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14966790

Change-Id: I7c81c6696c01714be0ac7a22d3300921058731a5
2021-06-14 21:52:57 +00:00
TreeHugger Robot
cd140900ed Merge "Handle exact alarm permission state changes" into sc-dev 2021-06-14 21:43:49 +00:00
Jeff Sharkey
90153d67e0 HULK SMASH! We've gotta declare REL.
Bug: 171506470
Test: none
Change-Id: I22d317f873abf22586d9907fbc22330639d5e773
2021-06-14 15:28:31 -06:00
Prabir Pradhan
c257fb9ee1 Update docs for onBackPressed
After changing the default behavior of the back button in S, we should
update the javadocs to reflect the change.

We also make a recommendation for developers to call through to the
super implementation to maintain consistency in navigation patterns
throughout the platform, especially for things like splash screens.

Bug: 186142540
Bug: 188832670
Test: None
Change-Id: I1c71250b26bec743be15f4ac95965ef046dcf4f3
2021-06-14 19:37:22 +00:00
Calin Juravle
60f7b38892 Register the DexLoadReporter before creating the main class loader
We used to register the DexLoadReporter after the main class loader
was created. That was done to avoid superfluous reports of the app's
primary apks (since we already know about them).

However that also means that if the app would start as an isolated
process we would miss this signal in the DexManager.

Make sure we get signals for isolated processes by registering the
reporter before we create the main class loader.

Test: manual, using chrome and maps go
adb shell cmd package compile -m speed-profile com.android.chrome
adb shell am start -n \
com.google.android.apps.mapslite/com.google.maps.lite.twa.MapsLiteTwaLauncherActivity
adb shell dumpsys package dexopt
(confirm that chrome is used by an isolated process)
adb shell cmd package compile -m speed-profile com.android.chrome
(confirm that chrome is speed compiled - or verify, based on the device
setting)

Bug: 163018062
Merged-In: I5d683ae85b3973cc2011dd33b4cb14837b18005f
Change-Id: I5d683ae85b3973cc2011dd33b4cb14837b18005f
(cherry picked from commit 875888eff3)
2021-06-14 16:51:39 +00:00
Kholoud Mohamed
4dd90319ad Merge "Fix security vulnerability in DPMS" into sc-dev am: 58d0a17836
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14919135

Change-Id: I177845b6dbdde307752cd0af5b84bfc1b5a5e768
2021-06-14 09:29:46 +00:00
Kholoud Mohamed
58d0a17836 Merge "Fix security vulnerability in DPMS" into sc-dev 2021-06-14 09:11:57 +00:00
Suprabh Shukla
c3f067c103 Handle exact alarm permission state changes
The permission SCHEDULE_EXACT_ALARM state changes at the following
boundaries:
 1. App-op: This gets toggled by the user via Settings.
 2. Deny-list: Packages can be added to the deny list via DeviceConfig
 APIs.
 3. Package changes: A package's manifest may changes when it gets
 updated.

In both cases 1 and 2, if alarm manager detects a permission change
from revoked to granted, it sends the
ACTION_SCHEDULE_EXACT_ALARM_PERMISSION_STATE_CHANGED broadcast to the
app.
If it detects a permission change from granted to revoked, it kills
all the processes within the hosting uid.
In all three cases, when the permssion changes from granted to revoked,
all the exact alarms scheduled by the relevant package are removed.
Package updates are treated differently as they require processes to
restart anyway. The broadcast is not needed in this case as there
are no alarms expected to have been lost by a previous revocation, and
apps can always use ACTION_MY_PACKAGE_REPLACED for post-update setup as
usual.

All this only applies to packages that have the change
REQUIRE_EXACT_ALARM_PERMISSION enabled.

Also changed canScheduleExactAlarms to return false if the change is not
enabled for the calling package.

Test: atest FrameworksMockingServicesTests:AlarmManagerServiceTest
atest CtsAlarmManagerTestCases

Bug: 179541791
Bug: 187206399
Change-Id: Icd68275701f2804be65b3a10a7dd81bbf6e2a0bb
2021-06-13 16:55:21 -07:00
Erik Wolsheimer
b6467b2670 Merge "Store whether attribution tag is valid separate from bypass" into sc-dev am: 6d3212e617
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14955197

Change-Id: I76343eccc841fe097596ab14d02a39b487658704
2021-06-13 03:29:09 +00:00
Erik Wolsheimer
947cb752b8 Store whether attribution tag is valid separate from bypass
Bug: 189484870
Bug: 190073375
Test: Manual
Change-Id: Iccc0e887d28c837a8ef4099af611794590af25c5
2021-06-12 16:36:57 -07:00
Ryan Mitchell
7feeebf128 Merge "Fix RRO handleConfigurationChanged race condition" into sc-dev am: 55128109d9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14923667

Change-Id: Ic3d6aee13bdf09cbff6bb74bab70071268fdbe50
2021-06-10 19:52:55 +00:00
Ryan Mitchell
55128109d9 Merge "Fix RRO handleConfigurationChanged race condition" into sc-dev 2021-06-10 19:49:40 +00:00
Pavel Grafov
b45b862d36 Merge "Don't reset user VPN without reason" into sc-dev am: c0115519f6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14717702

Change-Id: Ic2ebf54458f7f5cf5e500093e150756231073a11
2021-06-10 15:45:18 +00:00
Ryan Mitchell
119a7f5591 Fix RRO handleConfigurationChanged race condition
Retrieval of the system and system UI themes should be done with the
ResourcesManager lock held to ensure the theme retrieved has the new
overlays applied.

Bug: 189100984
Test: manual
Change-Id: Ibe27ec745ea5a914d3d05e393598a336d96a55e6
2021-06-10 08:41:17 -07:00
Pavel Grafov
c0115519f6 Merge "Don't reset user VPN without reason" into sc-dev 2021-06-10 15:31:04 +00:00
kholoud mohamed
342fd83483 Fix security vulnerability in DPMS
Changed DPMS#isPackageAllowedToAccessCalendarForUser to always require
INTERACT_ACROSS_USERS/_FULL permission if called for a different uid
than the calling uid.

Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
Bug: 187043716
Change-Id: I230bbffbdf97c251c8a40add097b3b4254d39452
2021-06-10 13:49:25 +00:00
James O'Leary
4084659caf Merge changes from topics "quantizer_improved_logic", "reintroduce_scaling_fixes" into sc-dev am: e0970984c8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14802974

Change-Id: I99e2facf17062876ac1501384ddb9dbbd26a3ef8
2021-06-09 22:30:49 +00:00
James O'Leary
e0970984c8 Merge changes from topics "quantizer_improved_logic", "reintroduce_scaling_fixes" into sc-dev
* changes:
  Quantize image to 128 colors instead of 5
  Quantizer improvements
  Sort colors from high count => low count
  Don't interpolate image input to quantizer
  Cache set wallpaper as PNG instead of JPEG
  Only rescale wallpaper if its > display height
2021-06-09 22:23:24 +00:00
Julia Reynolds
8c497473a0 Merge "Update logic about parent and convo channels" into sc-dev am: b87598c3cc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14907947

Change-Id: Idb384f25f51a07c352b3c77df43edd20c20868bb
2021-06-09 18:04:04 +00:00
James O'Leary
bf1b65be0e Quantize image to 128 colors instead of 5
Quantizing an image to five colors results in an extreme amount of
averaging of colors, leading to low chroma colors and erasing colors
from the image that the eye gravitates towards.

Coupled with a change to ensure there's still a broadly accurate signal
of a given cluster's population of the image, via summing the population
of all the clusters close to the hue of the cluster, and with proof that
having this many data points doesn't lead to instability in results,
we gain access to a much larger variety of colors. This gives room to
add heuristics to avoid 'bad' colors, as well as increase the
number of colorful colors we offer.

Bug: 189931209
Test: Test tons and tons of wallpapers over a couple days.
Change-Id: Ifc2d9393039194c151920536b9217ae9636ff0d6
2021-06-09 13:33:41 -04:00