Commit Graph

18248 Commits

Author SHA1 Message Date
TreeHugger Robot
4827ea25a2 Merge "Add a few TODOs for removing getSfInstance" into tm-dev 2022-03-10 17:28:32 +00:00
TreeHugger Robot
771ed53fc2 Merge "Introduce a flag to enable shell caption" into tm-dev 2022-03-10 09:34:19 +00:00
Yunfan Chen
40c0b8bdb9 Introduce a flag to enable shell caption
A new interface in WindowManagerProxy was introduced to let the shell be
able to set insets with a given frame. The interface won't work for
caption as we applied special logic to assemble the caption frame with
the attached task frame. To make it work with caption insets, we need to
disable all the special logics to make use of the shell interface.

A flag CAPTION_ON_SHELL is introduced to disable the calling path and
enable the above client owned logic. Turn the flag to true when the
caption is moved to shell.

Test: InsetsControllerTest, WindowContainerInsetsSourceProviderTest
Bug: 189998209
Change-Id: I989b319001a118d1f1ff8e34761b39ee18fde335
2022-03-10 16:06:22 +09:00
Sarup Dalwani
bf3f189a34 Merge "Renaming isCredentialSharedWithParent to isCredentialSharableWithParent" into tm-dev 2022-03-10 05:59:57 +00:00
Aleksandr Litovchenko
15aafa78c9 Make LockPatternView dot hit area circular.
Dot hit area is rectangular. Make it circular to be able to increase the area and preserve diagonal connections.
Cover with tests to ensure that touches handled correctly.

Bug: 204870856
Bug: 215183631
Tests: LockPatternViewTest and manualy on watch and phone
Change-Id: I7d7b539afcdd4d86cb8f828030a2f4866963f8aa
2022-03-09 11:50:49 +00:00
Wu Ahan
b6acbe6ce0 Merge "Add CUJ constants for SUW jank insturmentation" into tm-dev 2022-03-09 10:07:42 +00:00
Eric Biggers
031a23fa87 Stop trying to update FDE password from LockSettingsService
Since FDE is no longer supported, updating the FDE password never does
anything.  Stop trying to do so.  Remove updateEncryptionPassword() from
ILockSettings, since its only caller outside of LockSettingsService
itself was in LockPatternUtils, and the previous CL removed that caller.

Bug: 208476087
Change-Id: I46c2a472177836f0c9084e4c3b4ed2e6c0ab61d5
(cherry picked from commit 3762ada110)
Merged-In: I46c2a472177836f0c9084e4c3b4ed2e6c0ab61d5
2022-03-09 03:13:13 +00:00
Eric Biggers
50cfdac9ba Remove clearEncryptionPassword() from LockPatternUtils
Remove this method which cleared the FDE password, since is no longer
used.  It was only being used by the accessibility settings in the
Settings app, and that caller was removed by http://ag/16624515.

Bug: 208476087
Change-Id: If0c75774555d3503f21857e66cce527c5edfa586
(cherry picked from commit 8e265a9fd3)
Merged-In: If0c75774555d3503f21857e66cce527c5edfa586
2022-03-09 03:12:59 +00:00
Eric Biggers
87d60042aa Merge "Stop trying to get/set fields in FDE footer" into tm-dev 2022-03-09 03:08:05 +00:00
Eric Biggers
661fdb3d9f Stop trying to get/set fields in FDE footer
Now that FDE is no longer supported, getting/setting FDE fields is
always a no-op, so there is no need to do so.

Bug: 208476087
Change-Id: Iab7ba8d36890daa0645b2cedf33e4bd177a86b63
(cherry picked from commit c6ce767e59)
Merged-In: Iab7ba8d36890daa0645b2cedf33e4bd177a86b63
2022-03-08 17:08:39 -05:00
Xiang Wang
81aa0eac27 Merge "Provide game task bitmap to TakeScreenshotService as screenshot" into tm-dev 2022-03-08 20:06:57 +00:00
Evan Rosky
10dc2271c1 Merge "move shell_transit sysprop to persist.wm" into tm-dev 2022-03-08 19:34:01 +00:00
TreeHugger Robot
18654af7fd Merge "Use parentUserId when reading config_imeDrawsImeNavBar" into tm-dev 2022-03-08 00:45:59 +00:00
TreeHugger Robot
fca00d3193 Merge "Introduce InputMethodNavButtonFlags" into tm-dev 2022-03-07 22:00:58 +00:00
Yohei Yukawa
f93769b1ae Use parentUserId when reading config_imeDrawsImeNavBar
This CL rewrites my previous CLs [1][2], which were written with an
incorrect assumption that config_imeDrawsImeNavBar was overlaid for
the entire profile group.

While SysUI's navigation mode is dynamically configurable with Runtime
Resource Overlay (RRO), it turns out that we currently configure RRO
only for the profile parent user.  This means that processes run under
other profile users continue seeing the base resource value regardless
of how RRO is configured for the profile parent user.  This is the
root cause of Bug 219604375.

To work around this limitation, this CL uses InputMethodManagerService
to monitor the value of config_imeDrawsImeNavBar for the profile
parent user then to propagate it to the IME process.  Luckily we have
already been doing a similar thing for the IME switcher visibility.
What this CL does is 1) adding a new flag to InputMethodNavButtonFlags
then 2) just using the flag sent from IMMS instead of directly reading

  config_imeDrawsImeNavBar

NavigationBarController.

Alternative solutions considered:

* Set RRO for profile users

  One of straightforward ways to address this problem is letting the
  Setting app apply the same RRO for other profile users.  However,
  this could be tricky when 1) the user changes navigation mode then
  2) sets up a new profile, because the Settings app is not an
  always-running process.  While we might be able to rely on

    com.android.settings.SettingsInitialize#onReceive()

  to do so, the profile user's state could be left in a broken state
  if that method was somehow interrupted.  To minimize the risk, we
  decided to not take this approach for T.

* Make OverlayManager be aware of profile groups

  Given how RRO is used in SysUI, it's make more sense if
  OverlayManager natively supports resource overlay for the entire
  profile group.  However, introducing such a new concept is too late
  for Android T.  We have filed Bug 221443458 to see if we can do this
  in a future version of Android.

 [1]: I3e7e1f83554444131e2765dc159617bb9e2337c7
      ff7b453ca8
 [2]: Id0cfa44cce5de515dc5d28254e1d41bdfc01e201
      177e4aafdb

Fix: 219820813
Test: Manually verified as follows
  1. Build aosp_coral-userdebug then flash it.
  2. adb root
  3. adb shell setprop persist.sys.ime.can_render_gestural_nav_buttons true
  4. adb reboot
  5. adb install -r TestDPC-normalv8001.apk
  6. adb shell am start -n com.afwsamples.testdpc/.SetupManagementLaunchActivity
  7. Set up work-profile
  8. make -j EditTextVariations
  9. adb install -r \
   $ANDROID_TARGET_OUT_TESTCASES/EditTextVariations/arm64/EditTextVariations.apk
 10. adb shell am start --user 0 -n \
   com.android.inputmethod.tools.edittextvariations/.EditTextVariations
 11. adb shell dumpsys input_method | grep mNavigation
      -> "mNavigationBarController={mImeDrawsImeNavBar=false, ..."
 12. Enable gesture navigation
 13. adb shell dumpsys input_method | grep mNavigation
      -> "mNavigationBarController={mImeDrawsImeNavBar=true, ..."
 14. adb shell am start --user 10 -n \
   com.android.inputmethod.tools.edittextvariations/.EditTextVariations
 15. adb shell dumpsys input_method | grep mNavigation
      -> "mNavigationBarController={mImeDrawsImeNavBar=true, ..."
Change-Id: Id3d6a71d8ba1bfa49131350b68aa8d3424eca381
2022-03-07 11:13:58 -08:00
Yohei Yukawa
5f9f1ca560 Introduce InputMethodNavButtonFlags
This CL reworks my previous CL [1], which let
InputMethodManagerService report whether the IME switcher icon needs
to be shown or not to the IME process by using IInputMethod IPCs.

It turns out that we need to propagate one more boolean value in order
to address Bug 219820813.  It'd be much clearer if we use bit flags
rather than adding a new boolean parameter to each IPC method.  Thus
this CL rewrites my previous CL by using a bit flag defined in a newly
introduced InputMethodNavButtonFlags.

This is a purely mechanical refactroing.  There should be no behavior
change.

 [1]: I5de9ac0dc8670842edf66306bb4c281c77cea376
      75b935a12b

Bug: 215551357
Bug: 219820813
Test: Manually verified with for the following scenarios:
 * Enabling/disabling multiple IMEs
 * Attaching/detaching a hardware keyboard
 * Showing/hinding the IME switcher
 * Showing an IME on the lock screen
Change-Id: I81cb062a08d484ec8ce5d7b2fea64ce19028f82e
2022-03-07 10:47:47 -08:00
Julia Tuttle
6c56b7dea8 Make StatusBarService.clearNotificationEffects oneway
This doesn't need to be blocking (as far as me and a colleague can tell)
and was causing ANRs.

Bug: 204160836
Test: tbd
Change-Id: I16f7e20ddbcdb7546038273aede545a920fce87e
(cherry picked from commit 340cf6fdad)
2022-03-07 17:35:56 +00:00
Sarup Dalwani
61321ebc97 Renaming isCredentialSharedWithParent to isCredentialSharableWithParent
Renaming isCredentialSharedWithParent to isCredentialSharableWithParent,
as for work profile there is possibility to enroll its own credential.

Bug: 222108271
Test: atest android.multiuser.cts.UserManagerTest
atest LockSettingsServiceTests

Change-Id: If343342d0a5e996cbd430a4063b25fbc4874c5c0
Merged-In: If343342d0a5e996cbd430a4063b25fbc4874c5c0
(cherry picked from commit ece66c4116)
2022-03-07 15:00:19 +00:00
Issei Suzuki
4a785a1407 Merge "Apply right animation type on translucent window containers." into tm-dev 2022-03-07 11:46:47 +00:00
Chiachang Wang
7d2434fb76 Merge "Set local routes exclusion in the networkAgent" am: 4734b5810b am: b8cda9d7e0 am: c30f82b94b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1978095

Change-Id: I6bb0fc565b0596a17b47cf58878193b132b887cf
2022-03-07 08:30:24 +00:00
Chiachang Wang
c30f82b94b Merge "Set local routes exclusion in the networkAgent" am: 4734b5810b am: b8cda9d7e0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1978095

Change-Id: I46931b7926b1da889989384159b012826e02d96a
2022-03-07 08:09:05 +00:00
Chiachang Wang
b8cda9d7e0 Merge "Set local routes exclusion in the networkAgent" am: 4734b5810b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1978095

Change-Id: I03eaf7cf1ffc7237f267a85d2d1a25d93afe3896
2022-03-07 07:46:21 +00:00
Chiachang Wang
4734b5810b Merge "Set local routes exclusion in the networkAgent" 2022-03-07 07:25:52 +00:00
Chiachang Wang
68e528d468 Set local routes exclusion in the networkAgent
Add a field in the VpnConfig to store local route exclusion
bit from VpnProfile, and set the value into the networkAgent
of VPN network.

Bug: 184750836
Test: atest FrameworksNetTests HostsideVpnTests
Change-Id: I22b9a5990a3dab0418b44ec19d2996ead6529231
2022-03-07 04:26:52 +00:00
Xiang Wang
ab322f8521 Provide game task bitmap to TakeScreenshotService as screenshot
* Move the BitmapUtil to com.android.internal package
* Remove bitmap result from GameSession#takeScreenshot API

Bug: 219992742
Test: atest GameServiceProviderInstanceImplTest
Change-Id: I4bf29d623f781434ec7ffe4443e658880c31e619
Move the BitmapUtil to com.android.internal package
2022-03-04 17:23:07 -08:00
Ady Abraham
6dc5f093c9 Add a few TODOs for removing getSfInstance
Bug: 162235855
Test: N/A
Change-Id: Ie5ed75aa3971844be37cea92f6c1a353e42e82e8
2022-03-04 10:01:37 -08:00
Matt Casey
8da492907e Merge "Don't show mini resolver if no same-profile targets" into tm-dev 2022-03-04 17:32:26 +00:00
TreeHugger Robot
761938ea59 Merge "Restrict getInputMethodWindowVisibleHeight" into tm-dev 2022-03-04 10:08:20 +00:00
Matt Casey
fdfb05e384 Don't show mini resolver if no same-profile targets
Previously we assumed there was at least one.

Test: atest ResolverActivityTests
Bug: 222497968
Change-Id: I4a5c43fe32e533841cb55cdfef6fc9aaea43f8cf
2022-03-03 12:03:07 -05:00
Issei Suzuki
a905fe439b Apply right animation type on translucent window containers.
Bug: 217174830
Test: atest TransitionTests
Change-Id: I97c5220b9fe3fde33e1426c8fc2598410fad3735
2022-03-03 15:08:10 +01:00
TreeHugger Robot
33a2b4bacd Merge "Incorporate API feedback: CAI requestCursorUpdates()" into tm-dev 2022-03-03 13:27:04 +00:00
Naomi Musgrave
3302797586 Merge "MediaProjection sets content recording details in WM directly." into tm-dev 2022-03-03 10:45:36 +00:00
Vadim Caen
8fa5667732 Merge "Move OnBackInvokedCallback to window package." into tm-dev 2022-03-03 10:03:41 +00:00
Ahan Wu
3bda078b54 Add CUJ constants for SUW jank insturmentation
Bug: 195899934
Test: build pass
Change-Id: Iece664bf3f69455670b0ca68e3c80b40acf05119
2022-03-03 15:28:14 +08:00
Evan Rosky
cf3d0a65a4 move shell_transit sysprop to persist.wm
This way we can use a context that systemui can set via flipper

Bug: 219067621
Test: manual
Change-Id: I29d1c39a1733e4d5f19f7f025e8a2cf2ca4f6d5a
2022-03-02 17:04:32 -08:00
Naomi Musgrave
27655e1fc3 MediaProjection sets content recording details in WM directly.
Content recording relies upon a class describing current state.
rather than passing around details from media > display > wm.
WMService keeps track of the session in ContentRecordingController.
ContentRecordingController manages hand-off between different
DisplayContent instances, as the session details are changed.

Manually tested that fold/unfold handling when screen recording
from QS tile still works, and that taking over a screen cast
with a screen recording works.

Refactoring logic from DisplayContent into new recording
delegate will come in a future change.

Bug: 216756854
Test: atest FrameworksCoreTests:ContentRecordingSessionTest
Test: atest WmTests:DisplayContentTests
Test: atest WmTests:ContentRecordingControllerTests
Change-Id: Ib4f125dd703d362ac13fcbe469d00b345827e706
2022-03-02 18:32:34 +00:00
TreeHugger Robot
987c93ce3c Merge "Configure handwriting window with the IME's pid and uid for ANRs" into tm-dev 2022-03-02 18:22:21 +00:00
David Samuelson
7e5dfec3b1 Merge "Improve handling of GameService when bound processes die." into tm-dev 2022-03-02 16:01:53 +00:00
Vadim Caen
72077726f5 Move OnBackInvokedCallback to window package.
Originally, View was implementing onBackInvokedDisptacherOwner, but now
only Activity and Dialog and since back event are related to the
window, it makes sense to move them into the android.window package

This follow up comment at:
ag/c/platform/frameworks/base/+/16764116/comments/e131f3ef_e3e1d2e0

Test: atest BackNavigationTests
Bug: 221401221
Change-Id: Ia2f26162beb6a41b6e162b31e599e882f8bf7320
2022-03-02 16:28:57 +01:00
Pat Manning
60b397e84a Merge "Refactor force visible nav bar into new secure setting." into tm-dev 2022-03-02 13:51:27 +00:00
Mark Renouf
47821c98ee Merge "Simplify app prediction service check" into tm-dev 2022-03-02 12:24:24 +00:00
Prabir Pradhan
f1a82ef0ef Configure handwriting window with the IME's pid and uid for ANRs
When starting a handwriting session, update the handwriting input window
so that it is configured with the IME's pid and uid. This means any ANRs
that occur due to the handwriting input window will be directed to the
IME process.

Since oneway binder calls do not have pid information, we cannot use
Binder.getCallingPid() to get the pid of the IME. Instead, we report the
pid from IMS when starting handwriting.

Bug: 210978621
Test: manual with custom IME, verify ANR is directed to IME.
Change-Id: Ia6963eb02cad22c7f604896e6c78ed31c84e32f6
Merged-In: Ia6963eb02cad22c7f604896e6c78ed31c84e32f6
(cherry picked from commit 58df52232a)
2022-03-02 11:57:51 +00:00
TreeHugger Robot
951aa29f72 Merge "Fix memory flags in external services and secondary zygotes." into tm-dev 2022-03-02 00:57:51 +00:00
Joe Bolinger
532df4fc03 Merge changes from topic "coex-again-2" into tm-dev
* changes:
  Temporarily disable some biometric prompt tests.
  Add Face and Fingerprint (Co-Ex) support to biometric prompt.
  Remove face to fingerprint multi-sensor behavior.
  Remove duplicated UDFPS view into single fingerprint view.
2022-03-01 23:25:55 +00:00
David Samuelson
c9e4e76b2e Improve handling of GameService when bound processes die.
- Add callbacks to observer service lifecycle events to ServiceConnector.
 - Leverage callbacks to avoid re-binding to GameService in order to
   send disconnected event
 - Leverage callbacks to detect when GameSessionService process dies and
   destroy all GameSessions.

Test: Manually verified GameSession overlays are removed when
GameSession process crashes. Added unit test covering behavior.
Bug: 220204229
Bug: 215599171

Change-Id: Idda96f221e40c88f0f80c95bea94556275da5166
2022-03-01 22:05:48 +00:00
Mark Renouf
6e31f665ae Simplify app prediction service check
In support of sharesheet unbundling:
This code directly accesses private platform config resources
and cannot be used outside of system_server.

This was originally added during the Q->R transition as app
prediction service was ramping up [See b/138595943].
Incorrect versions would cause increased latency in opening
the sharesheet, app prediction missing but no crash.

If there is a problem with AiAi version configuration, that
should be addressed directly and not covered over by silently
disabling functionality.

At this time the package name returned from the system call
PackageManager#getAppPredictionServicePackageName() is passed
through the function "ensureSystemPackage" before being
returned this is sufficient to satisfy and availability checks.

Bug: 220895016
Test: manual; share content from app, verify share targets
Change-Id: I11aebe4fba1d96b543ba89482313668ce55b8ca4
2022-03-01 14:47:49 -05:00
Taran Singh
472e5c3825 Incorporate API feedback: CAI requestCursorUpdates()
1. Use intDef for CurosrUpdateFilter
2. overload requestCursorUpdates(mode, filter)
3. additional details in javadoc

Fix: 218314883
Bug: 210039666
Test: atest CtsInputMethodTestCases

Change-Id: I1dc5acac4f968b2a2d1780f2ee6c0145c7dcbbaa
2022-03-01 19:05:50 +00:00
Evgenii Stepanov
fe85ed2ef5 Fix memory flags in external services and secondary zygotes.
This change fixes a number of interconnected issues in memory safety
(MTE, GWP-ASan, nativeHeapZeroInit) runtime flags.

* Exported services use the hosting app UID to locate the process
  definition, and fail 100% of the time. Use the defining app UID and
  package name instead.
* Isolated services process name does not match the name in the defining
  app manifest, because it includes a class name and an instance number.
  Pass the defining process name in HostingRecord to address this.
* Exported service ApplicationInfo.packageName refers to the hosting
  app, again. As a result, wrong compat feature overrides are applied.
  This has been fixed before for AppZygote services; extend the fix to all
  external services.
* Pass correct memory runtimeFlags to WebViewZygote. This is important
  because both MTE and GWP-ASan have a one-way disable switch; they are
  enabled in the Zygote and disabled in the apps that do not opt-in.
  Passing 0 runtimeFlags to WebViewZygote (and AppZygote) makes it
  impossible to enable these features later in their child processes.

This change moves runtimeFlags logic from ProcessList to os.Zygote to
make it available to WebViewZygote.

Bug: 208910418
Test: CtsTaggingHostTestCases
Test: atest in frameworks/base
Test: CtsWebkitTestCases
Test: manual install WebView with android:memtagMode tag

Change-Id: I232d35344f4cd34226ff11324421904b35251525
2022-03-01 18:23:28 +00:00
Andrei-Valentin Onea
b486a6b6c6 Merge changes from topic "ignore-vendor-apex-allowlists" am: a22612eb94 am: 8ceedbd375 am: a5098729ea
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926339

Change-Id: I70b0ba1012990edb184db0e7362635b4e0533cd6
2022-03-01 16:34:12 +00:00
Andrei-Valentin Onea
a5098729ea Merge changes from topic "ignore-vendor-apex-allowlists" am: a22612eb94 am: 8ceedbd375
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926339

Change-Id: Ida1d994bb0f24f7a8f83bf1fef47d41457b243d1
2022-03-01 16:13:12 +00:00