Commit Graph

22494 Commits

Author SHA1 Message Date
TreeHugger Robot
d289bf2513 Merge "Revert "Decode the input of both setStream and setResource calls first"" into sc-v2-dev am: 613dfbf465 am: edb3c9e738
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16630306

Change-Id: I227235eb4c5606906d4fd8c1b4ae4d2d2eae47b5
2022-01-19 22:33:27 +00:00
Sudheer Shanka
e21748a999 Merge "Add a knob to change the impact of the notification-seen event." 2022-01-19 22:21:01 +00:00
TreeHugger Robot
edb3c9e738 Merge "Revert "Decode the input of both setStream and setResource calls first"" into sc-v2-dev am: 613dfbf465
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16630306

Change-Id: I8776eeb1756d32d748596c6d1da914c21c559ece
2022-01-19 22:14:13 +00:00
TreeHugger Robot
613dfbf465 Merge "Revert "Decode the input of both setStream and setResource calls first"" into sc-v2-dev 2022-01-19 21:26:40 +00:00
Steven Ng
ab4c4606f6 Merge "[Night] Add a new night theme trigger: bedtime" 2022-01-19 20:36:26 +00:00
Steven Ng
4263ab6637 [Night] Add a new night theme trigger: bedtime
This CL expands the existing UiModeManager APIs to allow users activate
dark mode at their configured bedtime schedule on supported devices,
i.e. devices with Digital Wellbeing preinstalled.

The CL added granular types for NIGHT_MODE_CUSTOM. There are two types
1. MODE_NIGHT_CUSTOM_TYPE_SCHEDULE
   This is the type for a schedule set up by users via the Settings
   app.
2. MODE_NIGHT_CUSTOM_TYPE_BEDTIME
   This is the type for a bedtime schedule set up by users via the
   Digital Wellbeing bedtime settings. Unlike
   MODE_NIGHT_CUSTOM_TYPE_SCHEDULE, Android framework doesn't have
   any information of the bedtime schedule. The activation of dark
   theme lives inside Digital Wellbeing

Test: unit tests: atest FrameworksUiServicesTests:UiModeManagerServiceTest
      CTS: atest CtsAppTestCases:UiModeManagerTest
      Manual testing via a system app integration
Bug: 210975231
Change-Id: I3b16e649a048f8a485b9e9d6464d4f251839320d
2022-01-19 19:25:50 +00:00
Antoan Angelov
9c74d73471 Merge "Add provisioning extra to keep screen on" 2022-01-19 12:22:22 +00:00
Pratyush More
ccbd71c78f Merge "Modify LocaleManager#setApplicationLocales Javadoc to explicitly mention persistence, and B&R." 2022-01-19 10:13:12 +00:00
Ankita Vyas
ad13719e71 Merge "Allow the installer of an app to get the app's locales." 2022-01-19 05:22:38 +00:00
Winson Chiu
156cb611e6 Merge "Move package parsing to services.jar" 2022-01-18 23:58:53 +00:00
Lee Shombert
dfc3a6ba76 Merge "Clean up PropertyInvalidatedCache for SystemApi" 2022-01-18 22:40:46 +00:00
Xinyi Zhou
b8389b280b Merge "Register NearbyManager in SystemServiceRegistry" 2022-01-18 22:30:05 +00:00
Lucas Silva
92cae130d0 Merge "Clean up CommunalManagerService" 2022-01-18 21:15:15 +00:00
Winson
efbb319630 Move package parsing to services.jar
This facilitates exposing the Parsed_ classes as
@SystemApi(client = SYSTEM_SERVER) while keeping everything inside
services.jar rather than having it split across both jars.

This reverts getPackageArchiveInfo to use legacy PackageParser, since
framework.jar can no longer access the moved classes.

Bug: 214038417

Test: presubmit, no logic changes

Change-Id: I152d70fb4f643d32efb012cfb20b0fbc5f88f2d8
2022-01-18 12:47:45 -08:00
Adam Bookatz
b738e3353f Merge "Allow bindServiceAsUser without _FULL if same app" 2022-01-18 19:04:56 +00:00
Joe Bolinger
648c0f9d73 Merge "Do not lock when biometric lock status is cleared." 2022-01-18 19:03:00 +00:00
Lucas Silva
b292ef1910 Clean up CommunalManagerService
This system service is no longer needed, as there is no longer a shared
lockscreen.

Test: locally on device
Bug: 206054365
Ignore-AOSP-First: cleanup
Change-Id: Ib2db06c377cf632da77dc41c629debfe658bfc48
2022-01-18 17:04:02 +00:00
Kholoud Mohamed
3c71e8fea8 Merge changes from topic "overrideDrawables"
* changes:
  Send broadcast when a device policy resource is updated
  Add APIs to allow updating enterprise related drawables
2022-01-18 15:51:59 +00:00
“Ankita
f9921942c4 Allow the installer of an app to get the app's locales.
Change the api from system to public api so that 3p installers can also use it.

Bug: 210981031
Bug: 193787310
Test: atest FrameworksServicesTests:LocaleManagerServiceTest
Test: atest CtsLocaleManagerTestCases
Change-Id: I98137941749725fbf2fe57d4a33d6abd8f99fffa
2022-01-18 14:18:33 +00:00
Pratyush More
919aa5d688 Modify LocaleManager#setApplicationLocales Javadoc to explicitly mention
persistence, and B&R.

Bug: 214016307
Test: Javadoc change only
Change-Id: I0caa14bca01e052ecfb93a4f3205f2c284f6d58a
2022-01-18 13:32:32 +00:00
kholoud mohamed
85316ade7d Send broadcast when a device policy resource is updated
Bug: 188410712
Bug: 203548565
Test: manual
Change-Id: Icad44019c3fd2691969eaaf6b518d2ddfb91d133
2022-01-18 11:01:25 +00:00
kholoud mohamed
3b378b1f47 Add APIs to allow updating enterprise related drawables
Add APIs to update and retrieve enterprise-related system drawables,
the APIs are guarded by a new permission that will be granted to the new
device management role holder.

Bug: 203548565
Bug: 188410712
Test: manual
Change-Id: Iab29db23a87e1481ba7e2996a704dcb2702444be
2022-01-18 11:01:13 +00:00
Xinyi Zhou
cbc8fed0bf Register NearbyManager in SystemServiceRegistry
Bug: 214495869
Test: Built and read the log
Change-Id: Idbf977a2c34949594657d881c413fcccc1657dd0
2022-01-17 23:24:05 -08:00
arangelov
8ad5a57b96 Add constants to support role holder updates
Bug: 214016873
Test: compiled
Change-Id: Ia9c856b9e24f99192f596c94f3bbdfa44f09c79a
2022-01-17 14:09:59 +00:00
Josh Hou
9e02fbf652 Merge "APP languages detection" 2022-01-17 10:58:05 +00:00
TreeHugger Robot
ea85bfc929 Merge "Fix IME shrunk by WindowTokenClient mis-detach" into sc-v2-dev am: ff6577fd10 am: 4b30a3ee91
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16598426

Change-Id: I7c73497ab7770240e8aadc96c3ef64e5c219cf75
2022-01-15 04:57:51 +00:00
TreeHugger Robot
4b30a3ee91 Merge "Fix IME shrunk by WindowTokenClient mis-detach" into sc-v2-dev am: ff6577fd10
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16598426

Change-Id: I2e7b34abfe7769160c383a0774cf3bb9635c46e2
2022-01-15 04:39:36 +00:00
TreeHugger Robot
ff6577fd10 Merge "Fix IME shrunk by WindowTokenClient mis-detach" into sc-v2-dev 2022-01-15 04:27:54 +00:00
Mady Mellor
877da241b4 Merge "Add hasSentValidBubble to NotificationManagerService" 2022-01-14 17:58:50 +00:00
Felipe Leme
07cf25574b Merge "Creates a generic mechanism to dump app-side information." 2022-01-14 17:43:28 +00:00
Ming-Shin Lu
29de30597b Fix IME shrunk by WindowTokenClient mis-detach
As CL[1] introduced WindowTokenClient for WindowProviderService (aka the
parent class of InputMethodService starts from CL[2]) as a token that
IME context can associate with the windowContainer of
the InputMethod window in server side. Like the activity context,
IME context can adopt configuration/resources update when the IME
window changed by display/window changes.

And, the IME context caller can also create another type of context
with wrapping IME context (i.e. calling createDisplayContext to create
a display context), that makes this context can be mixed the window
token of WindowProviderService since it's the base context.

However, the finalization of the context mixed WindowTokenClient
will detach the token when the attached context type is non-window
context, this action will mis-detach the token when it managed by
WindowProviderService.

So like SoftKeyboard previously using
createDisplayContext in CL[3] to workaround context resources issues,
will in-directly expose this mis-detach token issue as the above.

Beside, the handling of WindowTokenClient#{onConfigurationChange,
onWindowTokenRemoved} does not thread-safe since this is called from
IPC.

As the result, the fix is to ignore the check in ContextImpl#finalize
to not detach the token when it managed by WindowProviderService,
also make sure to post to the main handler when received
onConfigurationChanged/onWindowTokenRemoved in WindowTokenClient.

Note that this fix could help to resolve "The Window Context should
have been attached to a DisplayArea." exception if the token has been
detached as the above case that happens before the next
WindowProviderService#attachToWindowToken invoked.

[1]: I64a1614f32d097785915f6105b1813a929e0fe32
[2]: Ie565e30ed5dd3f2cfe27355a6dded76dc3adc14b
[3]: Ic592a1d2fb2da149220c8b503b522b3e864bcc77

Bug: 213118079
Bug: 211062619
Test: manual as steps:
1) adb install -r EditTextVariations.apk
2) adb install -r SoftKeyboard.apk
3) adb shell ime enable com.example.android.softkeyboard/.SoftKeyboard
4) adb shell ime set com.example.android.softkeyboard/.SoftKeyboard5
5) Enable screen auto-rotation
6) Launch EditTextVariations from launcher's shortcut
7) Tap the first EditText field to show IME
8) Rotate the device to the landscape mode
9) Expect the IME should not be shrunk

Change-Id: I7beb7a122af93e596239a36db62073233cea0726
2022-01-14 12:49:13 +00:00
Sudheer Shanka
6fce6e66ed Add a knob to change the impact of the notification-seen event.
Currently, notification-seen event will promote an app to
Working set bucket. This change adds a knob to allow changing
the bucket that the app gets promoted to on a notification-seen
event.

This change also updates AppStandbyController logic to allow
setting timeouts for buckets other than Active and Working set.

Bug: 206518483
Test: atest --test-mapping apex/jobscheduler/service/java/com/android/server/usage/TEST_MAPPING
Change-Id: Ic818c3871a34107b86b97c983285214beea220a5
2022-01-14 03:47:32 +00:00
Joe Bolinger
2f458df6f7 Do not lock when biometric lock status is cleared.
This can lead to a rapid unlock -> lock -> unlock cycle while keyguard is showing.

Bug: 210897417
Test: manual (unlock with fingerprint and verify adb logcat | grep keystore2::authorization shows 1 entry)
Change-Id: I318aaf52a3540f7209f3622e877f8935cffc7f6c
2022-01-14 02:04:43 +00:00
Mariia Sandrikova
a274e1a7d4 DO NOT MERGE Revert "[2/n] Camera Compat UI: Add interfaces for client-server..." am: 7617679a61
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16571392

Change-Id: I0adf2bf45c5f7d7349e9c0f180aea9d10f70645d
2022-01-13 22:55:51 +00:00
TreeHugger Robot
48b60587c6 Merge "Add @RequiresPermission for LAUNCH_DEVICE_MANAGER_SETUP" 2022-01-13 22:09:24 +00:00
Josh Hou
e19a1c6836 APP languages detection
Parse the contents of LocaleConfig's XML to obtain the app-specific supported locales

Bug: 203015582
Bug: 193787310
Test: atest LocaleConfigTest
      Local test APK
Change-Id: Ie9314e4c09f881f834bf7ea3cc0780d1545e6ce7
2022-01-14 04:26:49 +08:00
Felipe Leme
bcafba3a1f Creates a generic mechanism to dump app-side information.
Currently, 'dumpsys activity' can dump the state of some managers:
 - AutofillManager
 - ContentCapturemaanger
 - UiTranslationController

But the support for these custom dumping is hardcoded into
Activity itself, which makes it harder to extend. For example,
automotive builds provide an app-side Car object, which currently
cannot be dumped.

This CL makes the mechanism more flexible by providing a couple new
public / SystemAPIs that let Automotive (or other mainline modules)
extend it.

Examples:

$ adb shell dumpsys activity com.android.car.carlauncher/.CarLauncher --list-dumpables
$ adb shell dumpsys activity com.android.car.carlauncher/.CarLauncher --dump-dumpable CarUserManager
$ adb shell dumpsys activity service com.android.systemui/.SystemUIService CarUserManager

NOTE: this CL only adds the new APIs; a follow-up CL will change the
existing managers to use them.

Test: see above
Test: m update-api

Bug: 149254050
CTS-Coverage-Bug: 149254050

Change-Id: I6920ff3542d3d75edd667c2c7658e9d0a7af534f
2022-01-13 11:43:13 -08:00
Mady Mellor
8646e2c02c Add hasSentValidBubble to NotificationManagerService
If apps have conversations but not bubbles, we still show bubble settings
for them which is confusing for users. This change exposes whether an app
has sent a notification with valid bubble metadata, this allows us to hide
the setting until a bubble is actually sent.

If the app directs the user to bubble settings via the public intent,
they are still available.

Test: atest PreferencesHelper
Bug: 178387292
Change-Id: I7d3d92df49e7f4ed1d2c05cbba5f6f7786789d32
2022-01-13 10:40:48 -08:00
Erin Yan
86f682fd2f Merge "Add weak escrow token APIs" 2022-01-13 18:25:37 +00:00
Mariia Sandrikova
7617679a61 DO NOT MERGE Revert "[2/n] Camera Compat UI: Add interfaces for client-server..."
Revert submission 16468379

Reason for revert: Feature development is moving to T.

Reverted Changes:
Id9b9a8930:[3/n] Camera Compat UI: Add a camera compat contro...
Id6be4a954:Enable a camera app compat control on Large screen...
I083aa6718:[2/n] Camera Compat UI: Add interfaces for client-...

Bug: 206602997

Change-Id: I9ad876043fd61f708a8f468fffd1ef371bfa0866
2022-01-13 15:21:38 +00:00
Wu Ahan
aba1d77ff7 Revert "Decode the input of both setStream and setResource calls first"
This reverts commit f6a946bbcd.

Reason for revert: will deliver a better fix for that, ag/16580245.

Change-Id: I9c401b4cbded8753fc89df25a2c4f88a2fe72087
2022-01-13 14:30:26 +00:00
bsears
6daef580f7 Merge "Add checks to detect wrong conditions when creating Applications" 2022-01-13 06:40:23 +00:00
TreeHugger Robot
0c38295c7a Merge "Address BroadcastOption API feedback" 2022-01-13 03:00:42 +00:00
Adam Bookatz
a482921588 Allow bindServiceAsUser without _FULL if same app
Previously we allowed bindServiceAsUser in the following situations:
* caller has INTERACT_ACROSS_USERS_FULL
* caller has INTERACT_ACROSS_USERS and is in same profile group
* caller has INTERACT_ACROSS_PROFILES and is in same profile group and is the same app as the service

We now additionally allow:
* caller has INTERACT_ACROSS_USERS and is the same app as the service
(regardless of whether it is in the same profile group)

Bug: 209989958
Test: tested locally that granting the permission allows access to bindServiceAsUser
Test: atest UserControllerTest
Change-Id: I47d6f86fd159aa993971366ee9d7d334644d391e
2022-01-12 16:18:00 -08:00
Ashwini Oruganti
776b439703 Merge "Revert "Migrate unsafe parcel APIs in framework-minus-apex"" 2022-01-12 23:07:08 +00:00
Makoto Onuki
9b9ee9dc4b Add checks to detect wrong conditions when creating Applications
Bug: 185177290
Test: Boot + monitor logcat
Change-Id: Icd9f5e891c7b7fe32ee4144d95dd26139b87d9cf
2022-01-12 14:23:40 -08:00
Erin Yan
459f61152e Add weak escrow token APIs
Bug: 206485383
Test: atest LockPatternUtilsTest WeakEscrowTokenTests
Change-Id: I24cdf9af6c8f29db03ef214a1a0f8effad394264
2022-01-12 21:59:10 +00:00
Thomas Vannet
4c09f45a59 Merge "Add self revocation public API" 2022-01-12 21:44:32 +00:00
Antoan Angelov
5018db2046 Merge "Add intent extra for a custom consent screen intent" 2022-01-12 18:30:41 +00:00
Bernardo Rufino
331be9a643 Revert "Migrate unsafe parcel APIs in framework-minus-apex"
This reverts commit 90bb3709dc.

Reason for revert: b/214053959

Change-Id: Ic271bab1d3eaf677a5989dda9deb944ee2ad6850
2022-01-12 17:44:44 +00:00