Commit Graph

640958 Commits

Author SHA1 Message Date
Rubin Xu
f53bf832bd LockSettingsService: migrate to its own keystore namespace
Moves keystore keys used by LockSettingsService to a separate
namespace, migrating existing key during boot if needed.
Affected keys are encryption keys for synthetic password blob,
unified profile challenge encryption key and unified profile
challenge cache key.

Bug: 184664830
Test: atest com.android.server.locksettings
Change-Id: Iac339e64812232875afa9dc6109b848b50b0ef2f
2021-04-26 16:35:05 +01:00
TreeHugger Robot
fba76a66ff Merge "Treat TV_POWER as POWER on non-CEC sink" into sc-dev 2021-04-26 15:33:15 +00:00
Jeff DeCew
f32498ea35 Merge "Fix background color of the conversation guts" into sc-dev 2021-04-26 15:25:04 +00:00
Alex Johnston
3f716ff7a2 Merge "Remove PasswordMetrics.validatePasswordMetrics isPin param" into sc-dev 2021-04-26 15:24:16 +00:00
Jordan Demeulenaere
7f6bc03f00 Close the shade when launch animation is cancelled.
This CL makes sure that we close the shade when a launch animation is
cancelled. It also combines what we do when a launch animation won't run
(i.e. it is cancelled, aborted or timed out).

Bug: 184457208
Test: Manual
Change-Id: Id9b26e65e455e5b806a223575c31a9401cf91052
2021-04-26 17:22:17 +02:00
Ahaan Ugale
b8144d38cc Merge "Leverage new Audio history sharing for HotwordDetectionService." into sc-dev 2021-04-26 15:22:04 +00:00
Neil Fuller
30a6e0a4ae Merge "Add OWNERS for android/providers" 2021-04-26 15:18:37 +00:00
Ahaan Ugale
2434a92049 Merge "Translate: API for content padding." into sc-dev 2021-04-26 15:17:26 +00:00
Ming-Shin Lu
c647b32bcb Update IME control target when windowConfiguration changed
The CL is approching to fix the following cases:

1. App lost the IME insets control after exited from split-screen:

When entering split-screen, by default the IME control target is the
remote insets control target which is DisplayImeController in SystemUI.

the issue happens when the app task exited from multi-window mode, the
app will no longer controls the IME insets because the target is still
be remote.

Make sure to update the IME control target when windowing mode change
in case the app lost the IME inets control.

2. Somehow IME container failed to attach to the app during rotating

As DC#updateImeParent doesn't guarantee to be called after
onConfigurationChanged, and attaching IME container to the app requires
DC#isImeAttachedToApp to be true that the app's bounds should be match
it's parent bounds,

but invoking timing might happens on the intermediate state that the
bounds may not match during rotating.

In CL[1] we used a workaround to fix this potential issue by calling
updateImeParent while rotated the device -> swiping the app task with
IME to recents.

With this CL, both IME control target and IME container parent will be
updated when the windowConfiguration chagned,

And we can probably get rid of 2)'s workaround and will remove
that workaround in CL[1] in the next CL.

[1]: Ia6722e1cbccd7adc8aed1828265f6fa4df78df63

Fix: 184809885
Bug: 184020899
Test: atest WindowStateTests#\
      testUpdateImeControlTargetWhenLeavingMultiWindow
Test: manual as below steps:
    1) make & install WindowInsetsTests app
    2) Launch shortcut > press "Window Insets Controller" button
    3) Tap editText to show IME and press "IME VISIBLE / INVISIBLE"
       button to verify if the app can control IME visibility.
    4) Go to recents app and enter split-screen mode, launch any apps on
       the bottom split.
    5) Repeat steps 3 again to see if the app still can control IME
       visibility.
Change-Id: If5accb22340335c951b37fa29eb8c308179bf645
2021-04-26 23:12:39 +08:00
Galia Peycheva
49305fdbe6 Merge "Fix synchronization for BlurController.mBlurEnabled" into sc-dev 2021-04-26 15:10:44 +00:00
Joanne Chung
5d1ebc4f96 Merge "API feedback: TranslationCapability APIs refinement." into sc-dev 2021-04-26 15:07:58 +00:00
James Mattis
7bdd8f85d8 Merge "Changing per-app default request to TRACK_DEFAULT" am: bc4ca04caa
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1682063

Change-Id: I9632d12c85cc7d0c7d3c80333fdfba7ff024bff2
2021-04-26 15:07:48 +00:00
Riddle Hsu
2eee0e623a Fix creating unexpected letterbox surfaces
With fixed rotation, the rotated activity should compare bounds
with rotated display. Otherwise AR#isLetterboxedAppWindow will
return false and create unnecessary letterbox surfaces.

Note that fixed rotation only applies when display area matches
display bounds.

The method matchesDisplayBounds is removed because the only usage
in WS#computeFrame uses parent frame, that is computed from
configuration bounds which doesn't tie to an actual display.

Fix: 186407859
Test: DisplayContentTests#testApplyTopFixedRotationTransform
Change-Id: I8cd978844f0ba8f9739f90c5c624d0c5fc3dc339
2021-04-26 23:05:02 +08:00
George Chang
3b317f9134 Update register and unregisterControllerAlwaysOnListener
Don't register listener if Nfc ControllerAlwaysOn is not supported

Bug: 186172688
Test: atest NfcManagerTests
Test: atest android.permission.cts.NfcPermissionTest
Change-Id: I0e2a4ad372754c56f72296fdbaed8c98c06e1c56
2021-04-26 23:04:55 +08:00
Lais Andrade
fc0207696b Merge "Update javadoc for Vibrator.getPrimitiveDurations" into sc-dev 2021-04-26 14:56:15 +00:00
Sergey Nikolaienkov
59ea1a09a4 Merge "Introduce StartingWindowTypeAlgorithm interface" into sc-dev 2021-04-26 14:42:27 +00:00
James Mattis
bc4ca04caa Merge "Changing per-app default request to TRACK_DEFAULT" 2021-04-26 14:39:44 +00:00
Jeff DeCew
fb33675a10 Fix layout oscillation at the root of a few bugs.
Note: The CL which introduced this bug was Ic9cd89e899a03010a523bee4f1ef72fbfbd8b43f

Test: visual, manual
Test: Use TalkBack to validate that the size of the touch target is still >48dp tall.
Test: Use an app (e.g. LINE) which only posts the most recent message in an update to send 2+ messages to the device (to make the unread number visible), and validate that 1) the text is visible, and 2) there are not thousands of View errors spamming adb.
Fixes: 182474419
Change-Id: Ia23113f5903fe2c508fc2dbad99160471dcec5fd
2021-04-26 10:36:58 -04:00
Beverly Tai
eb54ad9bee Merge "Doze - remove metrics logger, add uievent" into sc-dev 2021-04-26 14:02:53 +00:00
Flavio Fiszman
47b06875bd Handling group chat sender
Change-Id: I4e4ff94e3452f3eb74bf8d7af2969e0ce2d3ac91
Test: manual and people/
Bug: 183084944
2021-04-26 14:43:35 +01:00
Siim Sammul
f95c09e3f4 Enable binder latency collection from system_server for dogfood.
Bug: 180584913
Test: code is unit tested
Change-Id: I68ab7f3bfc3364505ab6005933c2dc92f6eb486e
2021-04-26 14:22:26 +01:00
Galia Peycheva
57ef720249 Merge "Use global setting instead of forceWindowBlurDisabled" into sc-dev 2021-04-26 11:42:49 +00:00
Sergey Nikolaienkov
5a3ebc03f3 Introduce StartingWindowTypeAlgorithm interface
Extracting StartingWindowTypeAlgorithm static nested class within
StartingWindowController into StartingWidnowTypeAlgorithm interface and
PhoneStartingWindowTypeAlgorithm class that implemets the interface.

Adding an alternative implementation - TvStartingWindowTypeAlgorithm, for
use on TV. The TV implementation always returns StartingWindowTypeAlgorithm.

Setting up TvWMShellModule and WMShellModule to provide the TV and the
Phone implementations respectively.

Also removing a redundant StartingWindowController constructor.

Bug: 182759603
Test: make SystemUI
Change-Id: I10bab125320a9cdc9e3ddaedad1c74930b681fa6
2021-04-26 11:36:41 +00:00
Victoria Lestari
814ecd7277 Merge "Update comments for on-device intelligence processor configs" into sc-dev 2021-04-26 11:32:26 +00:00
TreeHugger Robot
d2c28835dd Merge "Allow Give Features from unregistered address" into sc-dev 2021-04-26 11:08:23 +00:00
paulhu
eb5d083e7b Add MATCH_ANY_USER flag to PackageInfo queries
- Querying PackageInfo should have MATCH_ANY_USER flag because
   some apps are only installed for specific users. If no flag,
   it will get NameNotFoundException.
- Also add missed break on switch case.

Bug: 186382373
Test: atests FrameworksNetTests
Change-Id: I37c8c42352a9a84ccbe9a37248febcd62b8f59e4
2021-04-26 19:03:20 +08:00
Robert Horvath
79ff669777 Merge "Conditionally show bootanimation for quiescent boots" into sc-dev 2021-04-26 10:59:51 +00:00
Santos Cordon
1a5ab36fcd Turn OFF any changing displays during device-state transitions
When transitioning from one device state to another,
turn off any displays that are going to change. This avoids
some jank and allows for devices that don't want more than
one display on at once.

1) Changes the isEnabled variable of LogicalDisplay to
a concept of display phases which can go between DISABLED,
ON, and TRANSITION. DISABLED meants the display is not visible to the
rest of the system. TRANSITION meants the display should remain off.
ON means that the display is running normally and its power should be
calculated by DisplayPowerController.

2) Displays will now remain off until WindowManager is finished
rendering the windows, which removes the device-state-transition
window jank.

Test: atest com.android.server.display
Bug: 183001297
Bug: 183895829
Bug: 175806738
Bug: 185354618
Change-Id: Icae68121162ff72913ff72ea73261ec0f448f330
2021-04-26 11:34:31 +01:00
Charles Chen
2f8d1baa63 Merge "Verify IME switch dialog on DualDisplayContent" into sc-dev 2021-04-26 10:29:24 +00:00
Alex Johnston
3eadf0dbc9 DISALLOW_USB_FILE_TRANSFER update user restrictions
Background
* On an org-owned device with a managed profile,
  the admin can apply some user restrictions on the
  personal profile (incl DISALLOW_USB_FILE_TRANSFER)
* When the admin applied DISALLOW_USB_FILE_TRANSFER,
  the device should stop the existing 'File transfer'
  mode USB connnection.

Change
* The broadcast recevier in UsbService should pick
  up receive broadcast intents for all users.

Manual testing
* Set up device in COPE mode
* Turn on USB 'File transfer' via Settings
* Open internal storage on computer connected via USB
  and browse some files on the device
* Apply DISALLOW_USB_FILE_TRANSFER
* Verify device no longer shows up in internal storage

Bug: 175757373
Test: manual testing
      atest UsbBackendTest
Change-Id: I8d47e728a26ba99dc3b5223d0d7d29085484f8f0
2021-04-26 11:28:03 +01:00
Jason Chang
6ba879052d Integrate DisplayLayout for Tutorial window of One handed mode
WindowManager#getCurrentWindowMetrics() will update later than
display layout changes, change to using DisplayLayout instead of using
 getCurrentWindowMetrics to prevent getting incorrect display sise.

Bug: 182281431

Test: manual
Test: atest WMShellUnitTests
Change-Id: I346887a6583a57403464f630a932d27a2182680f
2021-04-26 18:13:07 +08:00
Joanne Chung
2fcdb2cf9f API feedback: TranslationCapability APIs refinement.
- updates APIs naming and uses Consumer<TranslationCapability>
  instead of PendingIntent
- Implements the propagating capability updates in the client side

Bug: 176208267
Test: manual.
Test: atest CtsTranslationTestCases

Change-Id: I171c908b529e2ef300e4bbd55c1565b33a25c1e5
2021-04-26 18:10:49 +08:00
Mathew Inwood
6704441255 Merge "Revert^2 "API changes as requested by API council."" am: 0bd58c09b2 am: 67084eda34 am: 8a46fb77b2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1684202

Change-Id: If583a420ba194e6a34e5f4757c17ba6bbaff2992
2021-04-26 10:01:09 +00:00
Jeff Chang
911123acdd Update documentation for activity flags.
1. LAUNCHED_FROM_HISTORY, remove the out of date sentence.
2. NEW_DOCUMENT,add information about documentLaunchMode="never"
3. SINGLE_TOP, refer to launch modes for more information.

Bug: 123083574
Test: build
Change-Id: Id4da7be9993aaf1140c1c709a23ae7ed6d1718f5
2021-04-26 17:39:47 +08:00
Wilson Wu
58e49e3c7e Enable USE_REPORT_WINDOW_GAINED_FOCUS_ASYNC
We had CL[1] to construct an async mechanism if it
only report the focus gain in InputMethodManager.
And using a USE_REPORT_WINDOW_GAINED_FOCUS_ASYNC flag
to switch that new flow.

Flip this flag to enable this mechanism. If it need
to get back to previous sync behavior, we can revert
this change instead of CL[1].

[1]: Ic584203c1221fbae17f5e2d8f09e3992df061646

Bug: 185928120
Test: atest CtsInputMethodTestCases
Change-Id: I2d9600973b34c9d4818e96a8cef771b8a33a07ef
2021-04-26 17:38:23 +08:00
Flavio Fiszman
f98a859fc2 Merge "Adding logging to People Tiles" into sc-dev 2021-04-26 09:36:45 +00:00
Wilson Wu
5e2d9f271d Async startInputOrWindowGainedFocus
We ignore the result if startInputReason is
WINDOW_FOCUS_GAIN_REPORT_WITH_CONNECTION or
WINDOW_FOCUS_GAIN_REPORT_WITHOUT_CONNECTION
in startInputOrWindowGainedFocus.

Introduce USE_REPORT_WINDOW_GAINED_FOCUS_ASYNC
flag to control following behavior:

-. Don't wait the result if it only report the
   focus gain. Have another IPC for this case
   to prevent the UI thread be blocked.

-. Throw the exception to the client side if it
   happened.

Bug: 185928120
Test: atest CtsInputMethodTestCases
Change-Id: Ic584203c1221fbae17f5e2d8f09e3992df061646
2021-04-26 17:13:03 +08:00
TreeHugger Robot
2e26a6dae7 Merge "Add fade through threshould to the transition" into sc-dev 2021-04-26 09:04:34 +00:00
Mathew Inwood
8a46fb77b2 Merge "Revert^2 "API changes as requested by API council."" am: 0bd58c09b2 am: 67084eda34
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1684202

Change-Id: Ide1a12e8e7507383b4c233ff88a1a63590f0210e
2021-04-26 08:55:23 +00:00
Martijn Coenen
28acefc8ee Merge "Only allow the system to bind to the hotword detection service." into sc-dev 2021-04-26 08:33:37 +00:00
Mathew Inwood
67084eda34 Merge "Revert^2 "API changes as requested by API council."" am: 0bd58c09b2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1684202

Change-Id: Ife6df3a74ced06c37b5b641beb768dd5bce2d67c
2021-04-26 08:30:52 +00:00
Mathew Inwood
0bd58c09b2 Merge "Revert^2 "API changes as requested by API council."" 2021-04-26 08:19:47 +00:00
Ahaan Ugale
8dc9a795e0 Translate: API for content padding.
This allows controlling the content padding behavior needed with some
apps for compatibility reasons.
(see I9d7db5d2bc200e4042baf3267796f00cfc298f19)

The flag is currently the only property in the new UiTranslationSpec
value type, but more properties can be added in the future (such as
animation specifications).

Bug: 179693024
Test: manual
CTS-Coverage-Bug: 182990474
Change-Id: I11052cddb59c928b22ad9ad16e3c9b092da4b907
2021-04-26 01:14:02 -07:00
Marvin Ramin
fd5bd59e97 Allow Give Features from unregistered address
Bug: 169121415
Test: atest
Change-Id: I473d7795c108f949ca0fea985397adf71053878c
2021-04-26 09:50:30 +02:00
Ahaan Ugale
35f28d1bb2 Leverage new Audio history sharing for HotwordDetectionService.
The Audio Framework now supports sharing audio history, so
VoiceInteractionManagerService no longer needs to handle audio streams
itself.
See I5beba6c1e489148a14ba86165b8ef2fdc78c802a.

Bug: 168305377
Test: atest CtsVoiceInteractionTestCases
Test: manual
Change-Id: Ia7c5830aa5af6c015ae26619e0a90967ddff74e5
2021-04-26 07:50:01 +00:00
Jooyung Han
274b7bbfbd Make OverlayablePolicy as enum type
It's been used as a container of constants. "enum" suits better.

Fixes: 179836191
Test: m
Change-Id: Icbcda5707c0d2528dcbfad7e5add8d50bc4ec5b9
2021-04-26 13:52:40 +09:00
Rhed Jao
129aa44896 Add a synchronized lock into the SplitDependencyLoaderImpl
- There's a potential race condition going on when components
  from the isolated split are creating the split class loader.
  Add a synchronized lock for the array of cached class loaders
  and resource paths to prevent the race.

- Remove the synchronized class reference of LoadedApk. Using an
  explicit mLock object to synchronize the
  #createOrUpdateClassLoaderLocked() and cached split class loader
  instead.

Bug: 172602571
Test: atest IsolatedSplitsTests
Test: atest ClassloaderSplitsTest
Test: atest SplitTests
Change-Id: Ifb77d067ddf06b5192d7ce9d4e78958b56faac7c
2021-04-26 12:49:20 +08:00
wilsonshih
1d699ec6b1 Load higher resolution resource for icon on splash screen when needed
Enlarge the basic icon visible size to 160dp, and loading higher icon
drawable if available. For replaced icon we also enlarge the visible
area.
And if the icon does not need to draw the background, apply another 1.3
times scale than normal case.

TODO: need to handle legacy icon.

Bug: 182883560
Test: atest SplashscreenTests
Change-Id: Ia72a72a743a7ef5f80f247393c1a5bd0b6653a48
2021-04-26 12:36:54 +08:00
Josh Tsuji
ea36ab6533 Adds the continuous unlock animation!
This adds the new unlock animation, which is a subtle scale and translate from the bottom part of the screen. More importantly, it connects the surface behind the keyguard to your finger when swiping, so that it's one continuous motion between the lock screen and the app/launcher.

Issei's RemoteAnimation-enabling CL was rolled back for a test breakage, so you'll need to enable it to see this:
adb shell setprop persist.wm.enable_remote_keyguard_animation 1

A few P2 issues to be fixed in follow-up CLs since this one is getting large:
- Status bar icons need to animate mid-swipe so they don't jump cut post-unlock (b/183063033)
- Launcher should use a custom animation rather than surface-based animation (b/183063432)
- The scrim should probably animate out once the surface appears rather than at the end (b/183062235)
- Handle RemoteAnimation timeout, either by restarting it, or cancelling the gesture (b/183066204)

Test: change security to swipe, unlock via a slow swipe and a fast swipe and everything in between (also, release swipe halfway)
Test: PIN/password security
Test: double tap to open a notification
Test: fingerprint bypass
Test: fingerprint from lockscreen
Bug: 169692441
Change-Id: Ic78c603b2375d36cf2170b81cca7cddbf334408b
2021-04-26 04:13:24 +00:00
Qi Wang
cfa318ee4d Validate spell checker suggestions before applying.
Fix: 185786752
Test: atest CtsInputMethodTestCases:SpellCheckerTest
Change-Id: Icf447fc3ab174bc17af0e823b830f5abef6071df
2021-04-26 10:06:37 +08:00