Commit Graph

18037 Commits

Author SHA1 Message Date
Etienne Ruffieux
fa43f240c4 Merge "Moving bt stats logging to BatteryStats." 2022-01-29 10:27:49 +00:00
Yohei Yukawa
7a7271ddea Merge "Support IME switcher icon visibility update" 2022-01-29 00:42:58 +00:00
Joe Bolinger
8a2f880221 Merge changes Id07e160b,I3ac8049c
* changes:
  Update client monitors to use HAL context methods.
  Add communication channel for AoD state for all biometric operations.
2022-01-28 23:35:17 +00:00
Etienne Ruffieux
5c31c58990 Merge "Added BinderCallsStats Bluetooth initialization" 2022-01-28 22:05:17 +00:00
Oli Lan
93e80fe996 Merge changes from topic "avatarpicker1"
* changes:
  Offer colored default avatars if no preselected images are provided.
  Support taking or choosing a photo in avatar picker.
  Add avatar picker that shows a predefined set of images.
2022-01-28 19:09:23 +00:00
Michael Wachenschwanz
288b4bc054 Merge "Collect fine grain time-in-state Modem durations" 2022-01-28 18:11:53 +00:00
Yohei Yukawa
75b935a12b Support IME switcher icon visibility update
With this CL, the IME switcher icon becomes visible only when
necessary, even if InputMethodService renders the back button and the
IME switcher button in the gestural navigation mode.

Implementation idea:

InputMethodManagerService#shouldShowImeSwitcherLocked() is the source
of truth about whether the IME switcher visibility should be shown or
not, and it internally depends on the following conditions:

 A. com.android.internal.R.bool.show_ongoing_ime_switcher
 B. Whether the IME switcher is already shown or not.
 C. Whether the IME is perceptible or not.
 D. Whether one or more hardware keyboards are attached or not.
 E. Keyguard state.
 F. What IMEs and their subtypes are enabled.

Here are what those conditions would mean for this project.

 * A is considered to be a per-device constant value.
 * B, D, and F can happen at any time outside of the IME lifecycle
   events such as startInput().
 * C is no longer relevant if those buttons are rendered by the IME.
 * E is considered to be constant throughout each startInput() cycle.

This CL uses the following 3 IPCs to notify when the IME switcher
visibility is changing.

 1. IInputMethod#initializeInternal()
 2. IInputMethod#startInput()
 3. IInputMethod#onShouldShowImeSwitcherWhenImeIsShownChanged()

1 and 2 will be used to provide the "initial" value to avoid potential
flickers.  3 is still necessary to take care of async changes
triggered by B, D, and F.

Fix: 215551357
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: I5de9ac0dc8670842edf66306bb4c281c77cea376
2022-01-28 10:04:32 -08:00
Etienne Ruffieux
5166da8664 Moving bt stats logging to BatteryStats.
Tag: #feature
Bug: 211851706
Test: manual
Change-Id: I7e40b64eaa334792dd409837fb9f512714f65eec
2022-01-28 17:16:50 +00:00
Oli Lan
4f3a0b8fdb Offer colored default avatars if no preselected images are provided.
In the new avatar picker, if no preselected images have been provided,
this CL adds several color variations of the default avatar to the
picker instead.

Bug: 215134398
Test: manual
Change-Id: I3e1f617c760b241517f94c606f5cb21eafcc022d
2022-01-28 16:12:55 +00:00
Joe Bolinger
1a2536afdb Add communication channel for AoD state for all biometric operations.
This will be added to the client monitors with tests in a follow up change.

Bug: 204585936
Bug: 204584403
Test: atest AuthControllerTest
Change-Id: I3ac8049ca73cb8bf58b1c1d47945a528f26d02a3
2022-01-27 15:06:24 -08:00
Maurice Lam
482415bc29 Merge "Show error dialog if activity is blocked from streaming" 2022-01-27 22:52:40 +00:00
Maurice Lam
62f05520bf Show error dialog if activity is blocked from streaming
Bug: 203834118
Test: Tested with a virtual device with disallowed activities
Change-Id: I2edf93e3527c261756b52e6ec477e91afc2dd833
2022-01-27 10:50:17 -08:00
Etienne Ruffieux
8b6dc9b3ed Added BinderCallsStats Bluetooth initialization
Tag: #feature
Bug: 195146428
Test: manual
Change-Id: Ia9e35c8299fc039da977018eab84402c2ba0caab
2022-01-27 18:30:43 +00:00
Yohei Yukawa
678ddce11c Support light navigation bar
In order to propagate the information about whether the IME is using
light navigation bar or not from

  android.view.ViewRootImpl

to

  android.inputmethodservice.NavigationBarController

within the same process, this CL adds a new @hide method to

  Window.Callback

as follows.

 ViewRootImpl#performTraversals()
  -> DecorView#onSystemBarAppearanceChanged()
   -> Window.Callback#onSystemBarAppearanceChanged()
    -> SoftInputWindow#onSystemBarAppearanceChanged()
     -> NavigationBarController#onSystemBarAppearanceChanged()

Button color transition will be implemented in a subsequent CL.

Bug: 215549533
Test: Manually tested with ThemedNavBarKeyboard sample
  1. Build aosp_coral-userdebug and flash it
  2. adb root
  3. adb shell setprop \
      persist.sys.ime.can_render_gestural_nav_buttons true
  4. adb reboot
  5. make -j ThemedNavBarKeyboard
  6. adb install -r \
      $OUT/system/app/ThemedNavBarKeyboard/ThemedNavBarKeyboard.apk
  7. adb shell ime enable \
      com.example.android.themednavbarkeyboard/.ThemedNavBarKeyboard
  8. adb shell ime set \
      com.example.android.themednavbarkeyboard/.ThemedNavBarKeyboard
  9. Open the Dialer app
 10. Focus in the top edit field.
 11. Tap "EXTENDED LIGHT NAVIGARION BAR" mode
 12. Make sure that the navigation button color is optimized for light
     navigation bar.
 13. Tap "STANDARD LIGHT NAVIGARION BAR" mode
 14. Make sure that the navigation button color is optimized for light
     navigation bar.
Change-Id: I08566034bebfafff6777ce0152cd6ca1f66f6cad
2022-01-27 10:29:33 -08:00
Joanne Chung
4ccfe1a551 Merge changes I73bdec96,I1f2add3e,I2e704432
* changes:
  Handle touch focus when clicking toolbar window transparent area
  The client implementation for remote selection bar
  The service implementatoin of selection toolbar
2022-01-27 16:19:53 +00:00
Billy Lau
cfa26cb21e Merge "Add BinaryTransparencyService as new SystemService." 2022-01-27 15:36:49 +00:00
Joanne Chung
6e56f6bac9 The client implementation for remote selection bar
The DefaultSelectionToolbarRenderService renders the menu items and
callbacks to the application with the SurfacePackage and the relative
postition, the application will set the SurfacePackage to the
SurfaceView and put the PopupWindow on the correct position.

The MenuItemRepr is a copy from LocalFloatingToolbarPopup, no logic
change in this class. The above changes don't contain the solution
for transfering the touch focus on the non-toolbar part to the
application process. The part will be implemented on the follow up
change.

Bug: 190030331
Bug: 205823020
Test: manual. Enable the flag, try to selectin the text then the
toolbar can show successfully. Can open opverflow menu, scroll the
view, the selection toolbar also changes the position.

Merged-In: I3915e8165b4d371700cb5fb9e7eb23d46f39bd5c
Change-Id: I1f2add3e93cee9d7af20cba9ccd4e0b393afffcb
2022-01-27 21:24:36 +08:00
TreeHugger Robot
19b32787d1 Merge "Add hide-non-system-overlay flag for HarmfulAppWarningActivity" 2022-01-27 13:16:33 +00:00
TreeHugger Robot
4c4cd6f670 Merge changes from topics "CAI-filters", "onPrepareStylusHandwriting"
* changes:
  Scribe in IMF: Introduce filters in CursoAnchorInfo API 7/N
  Scribe in IMF: Early InkWindow preparation 6/N
2022-01-27 10:32:06 +00:00
TreeHugger Robot
e2c0779ad1 Merge "Indicate which detector triggered the HotwordDetectionService" 2022-01-27 08:36:32 +00:00
TreeHugger Robot
cc016b3496 Merge "Scribe in IMF: Stylus Spy windows Impl 5/N" 2022-01-27 08:33:08 +00:00
Calvin Pan
2801e6de4f Merge changes Ib484fc0c,I2b9ff69c,I0a31b117,I888c65c8,I03723cfe, ...
* changes:
  Clean <plurals> in DateTimeView
  Clean <plurals> in CertificateMonitor
  Clean <plurals> in FillUi
  Clean <plurals> in BugreportProgressService
  Clean <plurals> in keyguard
  Clean <plurals> in ChooserActivity
  Clear <plurals> in TextUtils
  Clean <plurals> in FindActionModeCallback
  Clean <plurals> in ZenModeConfig
  Add util class for plurals
2022-01-27 06:31:58 +00:00
Jing Ji
354efbc368 Merge changes from topic "bg_app_restrictions"
* changes:
  Expose the bg restriction exemption list as an internal API.
  Add an action button to the notification for bg battery abusive apps
  Exempt certain app behaviors for their background battery usage
  Add tracking on abusive broadcast and service binding requests
  Add exemption cases for app background restrictions
  Monitor long-running foreground services
  Post notification on abusive background current drain
  Allow limited alarms/jobs when background restricted
  Cap the LRU position of broadcast receivers in bg restricted apps
  Add a tracker on background current drains for each uid
  Add background restriction levels definition and its controller
2022-01-27 05:57:18 +00:00
lpeter
84cc4accd1 Indicate which detector triggered the HotwordDetectionService
Currently we are adding the metrics to find why there is a significant
drop in assistant successful queries for using trusted hotword. In the
metrics, we need to know which detector is used. In this patch, we
first provide the way to distinguish which detector triggered the
HotwordDetectionService.

Bug: 215633663
Test: atest CtsVoiceInteractionTestCases
Test: atest CtsVoiceInteractionTestCases --instant
Change-Id: I2fa904c5a52d714c9ecb545084ffb60e81ed1d8a
2022-01-27 11:53:16 +08:00
Dmitri Plotnikov
425fbd777e Merge "Add BatteryUsageStats.getDischargeDurationMs" 2022-01-27 02:27:01 +00:00
Dmitri Plotnikov
2fccc3a6bf Merge "Allow requesting BatteryUsageStats for specific power components" 2022-01-27 00:11:17 +00:00
Beverly Tai
3f6d9470cb Merge "Add interface for services to share SessionIds" 2022-01-26 23:26:10 +00:00
Michael Wachenschwanz
a4d057d791 Collect fine grain time-in-state Modem durations
Break down active modem time on a per Radio Access Technology, per
Frequency Range (for NR only), and per signal strength granularity.

Bug: 202413770
Test: atest BatteryStatsNoteTest

Change-Id: I299dc008ff1b370885601a9afbd8154dfd1082e5
2022-01-26 13:28:38 -08:00
Victor Hsieh
d707ebcd7a Merge "Delete legacy fs-verity support" 2022-01-26 19:10:10 +00:00
Dmitri Plotnikov
035fba8e31 Allow requesting BatteryUsageStats for specific power components
Bug: 216393849
Test: atest FrameworksCoreTests:BatteryUsageStatsProviderTest
Change-Id: I8db1f41c42929ab2cfc5c64dc0c1fce74ca19896
2022-01-26 08:41:28 -08:00
Taran Singh
7fbcbf27c7 Scribe in IMF: Introduce filters in CursoAnchorInfo API 7/N
New filter modes for InputConnection#requestCursorUpdates(mode) to allow
partial data in cursor/anchor updates.
Selective data helps with speedy CursorAnchorInfo updates.

Test: atest InputMethodServiceTest
Bug: 203086136

Change-Id: Ibba06e9a2533ca91c5cc215dfb18d21c9a74fb73
2022-01-26 15:41:27 +00:00
Taran Singh
342509f094 Scribe in IMF: Early InkWindow preparation 6/N
Allow stylus hover events for:
1. send early signal to IME onPrepareStylusHandwriting()
2. Prepare InkWindow internally.

Test: atest StylusHandwritingTest
Bug: 210039666
Bug: 203086136

Change-Id: Iebbd62659cb98b3c61edfa35d5a84a1c6837eb23
2022-01-26 15:41:27 +00:00
Taran Singh
52f330491b Scribe in IMF: Stylus Spy windows Impl 5/N
Implement Handwriting surface spy in IMF that listens
and manages Stylus events.

Test: atest StylusHandwritingTest
Bug: 210039666
Bug: 203086136
Change-Id: I8681a33bb32f20b48cf741ba3ad2116de5db7ffa
2022-01-26 15:41:24 +00:00
Junyu Lai
7296a513a2 Merge "[MS70] Have BatteryStatsImpl use the public NetworkStats API" 2022-01-26 04:14:19 +00:00
Calvin Pan
67e780def4 Clean <plurals> in ChooserActivity
Bug: 199230228
Test: make
Change-Id: Id1364a9c67187ee4839392751f6ed41ca1b281bc
2022-01-26 11:55:10 +08:00
Jing Ji
0c6603973a Post notification on abusive background current drain
Tapping on the notification will bring up the individual abusive
app's battery settings page. It won't be re-posted after being
dismissed until next day, in order to avoid from spamming the user.

Bug: 200326767
Bug: 203105544
Test: FrameworksMockingServicesTests:BackgroundRestrictionTest
Test: Manual - adb shell am set-bg-abusive-uids & verify notification
Change-Id: I0b30014d748863c66c3845b5f310948a9493e302
2022-01-25 14:33:21 -08:00
Victor Hsieh
1fb2d90296 Delete legacy fs-verity support
The "legacy" fs-verity was introduced in P in Pixel 3 kernel. During
fs-verity upstream to Linux, the API has changed. During Pixel 4 / Q
development, fs-verity was upstreamed to Linux kernel. By setting
ro.apk_verity.mode = 2, device vendors such as Pixel 4 can opt in to
enable the support. The feature has become mandatory for new devices
shipped with R.

Since Pixel 3 family is no longer supported, it's time to remove the
dead code.

Bug: 120629632
Test: m
Test: TH
Change-Id: I6dacd9bbd38b502ee510ff12970e76342d7b72dd
2022-01-25 17:22:36 +00:00
Beverly
03b39647cc Add interface for services to share SessionIds
- adds ability to start/end sessions via StatusBarService's
SessionMonitor
- adds ability to register/unregister for session listeners via
StatusBarService's SessionMonitor
- adds logic for SystemUI to start/end Keyguard and BiometricPrompt
sessions in SessionTracker

Test: atest AuthControllerTest SessionTrackerTest
Bug: 213483562

Change-Id: I50ea003baae4fb89e311fa442fd52397e03e514c
2022-01-25 17:17:32 +00:00
Junyu Lai
78fc678571 [MS70] Have BatteryStatsImpl use the public NetworkStats API
Test: BatteryStatsManagerTest
Bug: 204830222
Change-Id: I35dd909b5da563cea27d8a81a81fe472c59e9b17
2022-01-25 15:56:36 +00:00
Taran Singh
71aa1a31d1 Scribe in IMF: Automatically sub to CAI w/ Stylus 4/N
When Stylus handwriting mode is about to be used, automatically
subscribe IME to CursorAnchroInfo updates. This helps speed-up
stylus tasks in IME

Bug: 203086136
Bug: 210039666
Bug: 215533103
Test: atest CtsInputMethodTestCases
Change-Id: I3d6b1728d62139785593af14c24cb52bf2c91e31
2022-01-25 07:02:17 +00:00
Junyu Lai
278967f237 Merge "[MS61] Remove NetworkManagementSocketTagger#install dependency" am: 513d8dd2ac am: c756efe7bd am: 211ee3e066 am: 0c8b1eed04
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1952099

Change-Id: I6b3b75ddd650fb52983def1c05b581b0048f329d
2022-01-25 01:52:16 +00:00
Junyu Lai
0c8b1eed04 Merge "[MS61] Remove NetworkManagementSocketTagger#install dependency" am: 513d8dd2ac am: c756efe7bd am: 211ee3e066
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1952099

Change-Id: Ia76d1cf3d75f1189be719a9ded3d107ce1fd8221
2022-01-25 01:36:05 +00:00
Junyu Lai
211ee3e066 Merge "[MS61] Remove NetworkManagementSocketTagger#install dependency" am: 513d8dd2ac am: c756efe7bd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1952099

Change-Id: I6f031219bcd375b0ac4ec0819ae3c8341819f555
2022-01-25 01:24:35 +00:00
Junyu Lai
513d8dd2ac Merge "[MS61] Remove NetworkManagementSocketTagger#install dependency" 2022-01-25 00:48:23 +00:00
Billy Lau
d1fb08be0a Add BinaryTransparencyService as new SystemService.
Bug: 197684182

Created a new system service that aggregates information about:
1) signed partitions on device
2) APEXs installed on device
3) Modules installed on device

Introduces new adb shell commands as below:
adb shell cmd transparency get image_info [-a]
adb shell cmd transparency get apex_info [-v]
adb shell cmd transparency get module_info [-v]

Test: Built and tested locally on a bramble - the device boots.
Issuing adb shell commands as above provides correct outputs.

Change-Id: I2cae1bd794456688779c70c65b3f5ec8bcd7c6b3
2022-01-24 15:58:05 -08:00
Badhri Jagan Sridharan
d368d4ee67 Merge "Add systemApis to allow data transfer over USB-C while being docked" 2022-01-24 19:19:25 +00:00
Dmitri Plotnikov
5f9c679caf Add BatteryUsageStats.getDischargeDurationMs
This method returns the total amount of time the battery was
discharging during the current battery session.

Also, fixing time units used in BatteryStats tests: they are
supposed to be microseconds, not milliseconds.

Bug: 214407774
Test: atest FrameworksCoreTests:BatteryChargeCalculatorTest
Change-Id: I5b64a6bd8a577b558b90cb60a1db8c3774121921
2022-01-24 11:03:53 -08:00
Michael Wachenschwanz
9033b364a6 Merge "Small fixes to PowerProfile and ModemPowerProfile" 2022-01-24 18:06:04 +00:00
Kholoud Mohamed
35216e0275 Merge "Allow updating enterprise strings in the framework" 2022-01-24 15:09:02 +00:00
Siim Sammul
f08622a4df Merge "Move binder latency data logging to a background thread to improve performance of the main thread." am: 3af0c6a106 am: b24b15c6f9 am: 1f0a6f7d4e am: 4e38ab22c6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1942954

Change-Id: I9412c2969fa0f61fa7c0d67a279123622f893df6
2022-01-24 14:34:24 +00:00