Commit Graph

21358 Commits

Author SHA1 Message Date
Issei Suzuki
269dccb631 Merge "Persist Theme name instead of ID for ShortcutInfo" into sc-dev am: 41e7f367ed am: d0b15824a7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14783472

Change-Id: Ia71436f694d375222d77582136cdff43f3c264f5
2021-06-16 15:28:51 +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
c4f2cef8bb Merge "Revert "Revert "HULK SMASH! We've gotta declare REL.""" into sc-dev am: 5c80e3491d am: 86d161debf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14991077

Change-Id: Idbcde238e7a0961c82af18e7478ab1db38a65312
2021-06-16 02:39:43 +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
17c037df48 Merge "Revert "HULK SMASH! We've gotta declare REL."" into sc-dev am: a56beb126d am: 5abedc41c3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14973563

Change-Id: Ia27ba5c3a206782d7dcb4dd63730987dc9872d2c
2021-06-15 21:33:11 +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
a7c5e9e1af Merge "Update docs for onBackPressed" into sc-dev am: 1e40e4068d am: 1fde545ecf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14908762

Change-Id: Iac2cfbd30b7991872bbb739b63e2014fad8380b5
2021-06-15 19:12:46 +00:00
TreeHugger Robot
1e40e4068d Merge "Update docs for onBackPressed" into sc-dev 2021-06-15 18:33:01 +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
8b28ff544a Merge "HULK SMASH! We've gotta declare REL." into sc-dev am: 2a75262a96 am: 79e2715974
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14966105

Change-Id: Ide22693fb90fce774116130a7005830dfb7eb66f
2021-06-15 04:06:33 +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
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
e00c987610 Merge "Handle exact alarm permission state changes" into sc-dev am: cd140900ed am: b3fd0803b6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14922432

Change-Id: I69d3b29d2127629ec0199914df61c2687623bae2
2021-06-14 22:03:38 +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
aca6042027 Merge "Register the DexLoadReporter before creating the main class loader" am: 6fe0c8ea30 am: 0bd0d7e053 am: b6e7f8aa77 am: ae2ff8415d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1735263

Change-Id: I93208cdf18f44a5f7b3d36a388da23ef3469661a
2021-06-14 19:20:32 +00:00
Calin Juravle
ae2ff8415d Merge "Register the DexLoadReporter before creating the main class loader" am: 6fe0c8ea30 am: 0bd0d7e053 am: b6e7f8aa77
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1735263

Change-Id: Id1a3679d8c9158360e91e31a6bb81b6c05e79b1e
2021-06-14 18:25:16 +00:00
Calin Juravle
b6e7f8aa77 Merge "Register the DexLoadReporter before creating the main class loader" am: 6fe0c8ea30 am: 0bd0d7e053
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1735263

Change-Id: I4d42d5b4721354a8f98ba0e24f69a72be0066290
2021-06-14 18:06:55 +00:00
Les Lee
8517b85f11 Merge "Fix: query TYPE_WIFI usage with empty string" am: d9905a0e64 am: e0c2f2d5d7 am: 5ac7901f25 am: 2c550f7da4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1727620

Change-Id: Iddad476ef8258ffc7c4ab24510f9b1851aeb46e8
2021-06-14 17:27:49 +00:00
Les Lee
2c550f7da4 Merge "Fix: query TYPE_WIFI usage with empty string" am: d9905a0e64 am: e0c2f2d5d7 am: 5ac7901f25
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1727620

Change-Id: I68c6412ee562c620612932cd03466a894953c8e8
2021-06-14 17:20:27 +00:00
Les Lee
5ac7901f25 Merge "Fix: query TYPE_WIFI usage with empty string" am: d9905a0e64 am: e0c2f2d5d7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1727620

Change-Id: Ia869e47edec33397ccac5ec97fddf633fc9b8ab7
2021-06-14 16:59:57 +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
Calin Juravle
6fe0c8ea30 Merge "Register the DexLoadReporter before creating the main class loader" 2021-06-14 16:51:03 +00:00
Calin Juravle
875888eff3 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
Change-Id: I5d683ae85b3973cc2011dd33b4cb14837b18005f
2021-06-14 14:31:57 +00:00
Kholoud Mohamed
fd2f02e94d Merge "Fix security vulnerability in DPMS" into sc-dev am: 58d0a17836 am: 4dd90319ad
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14919135

Change-Id: I1523f5a849b8bbaa38ba7b6e3ec11c2a25c616a1
2021-06-14 09:45:27 +00:00
Kholoud Mohamed
6a21602ec7 Merge "Fix security vulnerability in DPMS" into sc-dev am: 58d0a17836 am: 3f00212c91
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14919135

Change-Id: I3c0473ac546b74818dd0b1a27f5b6b3b8f76ee92
2021-06-14 09:45:06 +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
013e3748c3 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: Ia405b5ed58d9eca1d4b8431f5adc52d565e6a1c3
2021-06-14 09:29:00 +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
6ad299b76f Merge "Store whether attribution tag is valid separate from bypass" into sc-dev am: 6d3212e617 am: 225ca7c7e0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14955197

Change-Id: I7e5544d92f0e3218f8e3bfec2c6758dae0f5a815
2021-06-13 03:45:52 +00:00
Erik Wolsheimer
1bce43f04e Merge "Store whether attribution tag is valid separate from bypass" into sc-dev am: 6d3212e617 am: 188e1736d3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14955197

Change-Id: Id30836eeadb6dab07f5e22e2e34da34ec80f4309
2021-06-13 03:39:38 +00: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
188e1736d3 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: I4e57121d58d758838849043cb91a818cd2444bf9
2021-06-13 03:28:17 +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
Les Lee
6a358bf024 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

Change-Id: I084b69903f8ba7a6225b312560752e8508938714
2021-06-11 18:14:50 +08:00
Ryan Mitchell
564eb292d5 Merge "Fix RRO handleConfigurationChanged race condition" into sc-dev am: 55128109d9 am: 7feeebf128
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14923667

Change-Id: I89ffc921ddd85a2f033757b0b2bae019f2343ce1
2021-06-10 20:05:15 +00:00
Ryan Mitchell
f56db3a0c5 Merge "Fix RRO handleConfigurationChanged race condition" into sc-dev am: 55128109d9 am: 03a41e3520
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14923667

Change-Id: I6a6f17c94ad4799b12eda73259e182d45e67cabd
2021-06-10 20:04:52 +00: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
0b81d98549 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: I0223ae25eaccbb5357b6738e0b75df7c534a72a3
2021-06-10 19:52:00 +00:00
Ryan Mitchell
55128109d9 Merge "Fix RRO handleConfigurationChanged race condition" into sc-dev 2021-06-10 19:49:40 +00:00
Pavel Grafov
b620951b84 Merge "Don't reset user VPN without reason" into sc-dev am: c0115519f6 am: f74b5d16c6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14717702

Change-Id: I1b8e37af88cd7ec00b7e084e85eaea019e0fd11e
2021-06-10 16:02:44 +00:00
Pavel Grafov
1b660860f6 Merge "Don't reset user VPN without reason" into sc-dev am: c0115519f6 am: b45b862d36
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14717702

Change-Id: Idc5548383f2d9819f999c1452ac05da6c0afa13d
2021-06-10 16:01:22 +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
0365d2850a 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: I4fb463bae9700c5e633ec10e5d6fe0090783734e
2021-06-10 15:36:37 +00:00
Pavel Grafov
c0115519f6 Merge "Don't reset user VPN without reason" into sc-dev 2021-06-10 15:31:04 +00:00