I inferred nullability annotations in Jetpack based on the guaranteed
behavior of the platform, so now I'm propagating those inferences back
to the platform as annotations.
Test: nullability presubmit checks
Fixes: 206801689
Change-Id: I78a1997faeecdafc51d303b0fc766369938b9101
This CL enable OnBackInvokedCallback to be saved in a WindowState and
queried by the BackNavigationController to be returned when
ATM.startBackNavigation() is called.
The DecorView provides a PendingOnBackInvokedDispatcher that can receive
callback registration before being added to a ViewRootImpl.
Test: atest FrameworksCoreTests:BackNavigationTest
Bug: 131727607
Change-Id: I01528a22ea4a6583a56ade4eab69136d727855d0
This migrates the media transfer from just a service to a full-fledged
@SystemApi. Some of the testing infrastructure has not yet been migrated
to keep this CL slightly smaller.
Bug: 216318437
Test: systemui media.taptotransfer tests *still need to be updated*
Change-Id: Idf1f72de1343020668e158d74051c1dfb970cfcd
When the current profile only has web browsers and the other profile has
a single non-browser app to handle the given intent, simplify the
resolver UI to present the user with a yes/no question about how to
handle.
Canonical example of this is "clicking a youtube link in your work
profile".
Bug: 175433480
Test: atest ResolverActivityTest
Change-Id: I213313ca87a8d1db5e586fe074f953060a91fc19
The new activity transitions are currently only supported in shell so we want to replace them with the old transitions when running using the legacy transition system
Fixes: 215512394
Test: Flash and make sure we are using the old activity transitions when shell transitions are disabled
Change-Id: I602852b16effa150fe697262a7d7e506c464d62a
As discussed in Bug 201375975, the nevigation bar handling for
floating IMEs is a bit tricky.
This CL tweaks DecorView behabior only when
InputMethodService#canImeRenderGesturalNavButtons(),
is true and the IME is floating in the gestural navigation mode.
Fix: 215550296
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 "FLOATING MODE" mode
12. Make sure that the navigation buttons are visible.
Change-Id: Ia54499a3c2ac6e33e72f625eba3477fd81649d32
This is a follow up CL to my previous CL [1], which introduced a
hidden callback method into Window.Callback.
This CL does not change any observable behavior but consolidate that
hidden callback into a newly introduced Window.DecorCallback
interface. In this approach, we no longer need to worry about
accidental method name collision in Window.Callback implementations
classes.
Here is the new callback chain.
ViewRootImpl#performTraversals()
-> DecorView#onSystemBarAppearanceChanged()
-> Window.dispatchOnSystemBarAppearanceChanged()
-> NavigationBarController.Impl#onSystemBarAppearanceChanged()
[1]: I08566034bebfafff6777ce0152cd6ca1f66f6cad
678ddce11c
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: I5168f76dfc9526e925c565dbfa87597b5543fcdc
+ Renaming to reflect the actual functionality of the class.
+ Move freeStorage related code to PackageManagerService, we will want
to clean that up later.
BUG: 198177734
Test: atest InstallLocationUtilsTest
Change-Id: I951129ffb5e53df548ef78fcd9de79c0ef994914
Update the delay of the ACTION_CHARGING/DISCHARGING broadcast whenever
the delay constant is updated to ensure that tests can run smoothly.
Bug: 214599394
Test: atest --rerun-until-failure 25 CtsJobSchedulerTestCases:BatteryConstraintTest
Test: atest --rerun-until-failure 25 CtsJobSchedulerTestCases:JobThrottlingTest
Change-Id: Ic664fa58edb3cab9980759baf356457158f66ead
* 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.
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
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
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
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
* changes:
Handle touch focus when clicking toolbar window transparent area
The client implementation for remote selection bar
The service implementatoin of selection toolbar
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
* 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
* 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
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