Commit Graph

18426 Commits

Author SHA1 Message Date
TreeHugger Robot
fa6bdc334a Merge "Use parentUserId when reading config_imeDrawsImeNavBar" into tm-dev am: 18654af7fd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17108239

Change-Id: I98ad80ce0886eff8e9b21f87962c4622f34921f8
2022-03-08 00:51:10 +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
d62c01d443 Merge "Introduce InputMethodNavButtonFlags" into tm-dev am: fca00d3193
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17108238

Change-Id: Iced5284614d59372477298d35290f0fa26167902
2022-03-07 22:09: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
Issei Suzuki
2623ae999e Merge "Apply right animation type on translucent window containers." into tm-dev am: 4a785a1407
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17002646

Change-Id: I7d526af15e6c6513252ef39f2fd01721898d8dd5
2022-03-07 12:08:00 +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
Sarup Dalwani
2076e74831 Merge "Renaming isCredentialSharedWithParent to isCredentialSharableWithParent" 2022-03-07 10:44:17 +00:00
Chiachang Wang
e0055a16e4 Merge "Set local routes exclusion in the networkAgent" am: 4734b5810b am: b8cda9d7e0 am: c30f82b94b am: 7d2434fb76
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1978095

Change-Id: Iba6e900e6b9b684c7ea1bca5b09af1f8735a3a2c
2022-03-07 08:50:17 +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
TreeHugger Robot
861feb383e Merge "Make StatusBarService.clearNotificationEffects oneway" 2022-03-04 19:31:09 +00:00
Matt Casey
edbf1f7afe Merge "Don't show mini resolver if no same-profile targets" into tm-dev am: 8da492907e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17069665

Change-Id: I95e7a7b8f6c7272e7ec0c8bd14e3299a2cba7287
2022-03-04 17:34:31 +00: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
f2b8547fd8 Merge "Restrict getInputMethodWindowVisibleHeight" into tm-dev am: 761938ea59
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16941141

Change-Id: I454208e50356ef61eadd9650f99a41a29771e1db
2022-03-04 10:31:35 +00:00
TreeHugger Robot
761938ea59 Merge "Restrict getInputMethodWindowVisibleHeight" into tm-dev 2022-03-04 10:08:20 +00:00
Julia Tuttle
340cf6fdad 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
2022-03-03 17:03:29 -05:00
Sarup Dalwani
ece66c4116 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
2022-03-03 17:23:49 +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
dc71c6ebf3 Merge "Incorporate API feedback: CAI requestCursorUpdates()" into tm-dev am: 33a2b4bacd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16977626

Change-Id: I29837bf7a2474d1e1f8e4562a54ecc94d50f027b
2022-03-03 13:38:47 +00:00
TreeHugger Robot
33a2b4bacd Merge "Incorporate API feedback: CAI requestCursorUpdates()" into tm-dev 2022-03-03 13:27:04 +00:00
Naomi Musgrave
769b37a901 Merge "MediaProjection sets content recording details in WM directly." into tm-dev am: 3302797586
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16933664

Change-Id: Ied0cd35f5fb924b0a47ffa862c9a19c82621606b
2022-03-03 10:52:52 +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
264ed1adbe Merge "Move OnBackInvokedCallback to window package." into tm-dev am: 8fa5667732
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17013983

Change-Id: Id59bf47b6ff48a22218519504c3994804f5cce06
2022-03-03 10:19:19 +00:00
Vadim Caen
8fa5667732 Merge "Move OnBackInvokedCallback to window package." into tm-dev 2022-03-03 10:03:41 +00: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
6061fe0b72 Merge "Improve handling of GameService when bound processes die." into tm-dev am: 7e5dfec3b1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16945424

Change-Id: I182afb6af2bf706689710bb70d7df96e949ef7a6
2022-03-02 16:05:54 +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
c285646041 Merge "Refactor force visible nav bar into new secure setting." into tm-dev am: 60b397e84a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17002888

Change-Id: Ic4d460e62abe780593735127554b75e1fed7adda
2022-03-02 14:11:46 +00: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
a2a0d740c0 Merge "Simplify app prediction service check" into tm-dev am: 47821c98ee
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17015405

Change-Id: If73b3b6564e97caf4fb4d7eb175361a6e4912b0e
2022-03-02 12:42:24 +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
eccf57ef5d Merge "Configure handwriting window with the IME's pid and uid for ANRs" 2022-03-02 05:22:35 +00:00
TreeHugger Robot
c9d7b97ea8 Merge "Fix memory flags in external services and secondary zygotes." into tm-dev am: 951aa29f72
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16989014

Change-Id: Ibfba1b5e3db063e4c34965b87d3e8df260bcd979
2022-03-02 01:19:29 +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
61cd3a1294 Merge changes from topic "coex-again-2" into tm-dev am: 532df4fc03
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17040854

Change-Id: I312b3ae24f36969ac6d22a3e507b92ebb6a46524
2022-03-01 23:41:52 +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