Commit Graph

18235 Commits

Author SHA1 Message Date
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
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
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
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
Rhed Jao
6bd95fdfb4 Ignore prebuilt shared library if it doesn't exist on device am: 791eb6934d am: e7be86fd15
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926342

Change-Id: Iff9caa4a49a55f47ef785466ba29f355a569593e
2022-03-01 16:13:04 +00:00
Pedro Loureiro
2367227297 Rename updatable-library to apex-library am: 1df9a1e8f5 am: be595a1cb7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1954037

Change-Id: I89d0a4a0ef490a8bc8d9bd41c346aece4e1df58e
2022-03-01 16:13:00 +00:00
Pedro Loureiro
c19d3ed957 Parse new xml attributes used for updatable shared libraries am: 5c228ca3e9 am: 7936aaf92e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926341

Change-Id: I7ae71734b45022e40403df1f1ec7d4290fb61d76
2022-03-01 16:12:58 +00:00
Alex Buynytskyy
56ab2afd2c Create XML parser only once. am: 66fc1f1941 am: 1adacbf9d7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926340

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

Change-Id: Ia43268fea619a0af6a39aef79cc52ed67e92ee99
2022-03-01 15:51:43 +00:00
Rhed Jao
e7be86fd15 Ignore prebuilt shared library if it doesn't exist on device am: 791eb6934d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926342

Change-Id: I63155e278047882b33af00e349d2a7a32099655c
2022-03-01 15:51:38 +00:00
Pedro Loureiro
be595a1cb7 Rename updatable-library to apex-library am: 1df9a1e8f5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1954037

Change-Id: I559fecd56edbc4fcf1047bb8ab9ec029e515e17f
2022-03-01 15:51:31 +00:00
Pedro Loureiro
7936aaf92e Parse new xml attributes used for updatable shared libraries am: 5c228ca3e9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926341

Change-Id: I2255f2357f4786cb8931e83cb007a2818a3ba720
2022-03-01 15:51:26 +00:00
Alex Buynytskyy
1adacbf9d7 Create XML parser only once. am: 66fc1f1941
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926340

Change-Id: I83e8a593a251300aee1fa8d6d9002d22eabf6fc8
2022-03-01 15:51:14 +00:00
Andrei-Valentin Onea
a22612eb94 Merge changes from topic "ignore-vendor-apex-allowlists"
* changes:
  Ignore vendor apex priv-app permission allowlists
  Add test for parsing apex allowlists
  Ignore prebuilt shared library if it doesn't exist on device
  Rename updatable-library to apex-library
  Parse new xml attributes used for updatable shared libraries
  Create XML parser only once.
2022-03-01 15:15:56 +00:00
Joe Bolinger
4f75555ac1 Add Face and Fingerprint (Co-Ex) support to biometric prompt.
Migrate simple views to Kotlin & remove useless test. Will add new tests in a follow up change.

Bug: 217393533
Test: atest com.android.systemui.biometrics com.android.server.biometrics CommandQueueTest
Test: manual (via BP test app)
Change-Id: Ic8c80344d75f34f4b5f65ef14b61bbb5cddb0349
2022-02-28 18:37:19 -08:00
Treehugger Robot
cdeb61ebb7 Merge "Add a runtime check to ensure that system server jars are prefetched." am: 990ac01f71 am: a80c2cd027
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1925695

Change-Id: I38f4a3f9f523fc2a59c0dd9569870c0a7de7379f
2022-02-25 14:35:25 +00:00
Treehugger Robot
a80c2cd027 Merge "Add a runtime check to ensure that system server jars are prefetched." am: 990ac01f71
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1925695

Change-Id: I90d1b85718c49e772107724aea59155dbe0bf8d1
2022-02-25 14:10:46 +00:00