Commit Graph

13764 Commits

Author SHA1 Message Date
Alison Cichowlas
b09236d867 Fix sharing shortcuts not showing for Work Profile.
Bug: 175042485, 175240616
Test: per repro instructions in bug
Change-Id: Iecbc57369f46fcae72d6acdb997ea8daacc77979
(cherry picked from commit 17cb4137ad)
2020-12-15 20:09:33 +00:00
TreeHugger Robot
14692e3d21 Merge "Fix wrong target launches in Chooser." into rvc-qpr-dev 2020-12-10 15:50:08 +00:00
Winson Chiu
5e971858b8 Merge "Remove updateIntentVerificationStatusAsUser from ResolverActivity" into rvc-qpr-dev 2020-12-08 00:25:50 +00:00
Alison Cichowlas
2c12806649 Fix wrong target launches in Chooser.
The service target row was sometimes overfull - with more targets in
the list than were displayed - when we used each row's offset
to calculate which target was selected to launch.
This fix makes sure we are not overfilling.

Test: ChooserActivityTest & manual repro -- use targets from
alphabetical section, make sure you have at least one old-API target
available
Fixes: 170518649, 165944833

Change-Id: I8a554197c01f4eadbeac43742984e4c86ca49601
(cherry picked from commit 6f015708fb)
2020-12-03 00:31:17 +00:00
Maryam Karimzadehgan
0ed68db06c Add flag to get the name of the Model file from the flag in case we want
to try out different models. In addition, we should not log touches in
the middle of the screen for logging so moving the block at the very
beginning.

Test: unittest, manual test
Bug: 150170384
Change-Id: I6ecb556fea01f26323248b999d17c7b1d1b7eeb7
Merged-In: I6ecb556fea01f26323248b999d17c7b1d1b7eeb7
2020-11-16 18:56:28 +00:00
Maryam Karimzadehgan
c7035fe4fe Use ML model for the Back Gesture in EdgeBackGestureHandler.
Change-Id: I2fd5255e903932c03a35ae463b0eff3840dc81bd
Merged-In: I2fd5255e903932c03a35ae463b0eff3840dc81bd
Test: manual model test and getting the results
Bug: 150170384
2020-11-11 20:17:56 +00:00
Winson
3ebeb4c490 Remove updateIntentVerificationStatusAsUser from ResolverActivity
DO NOT CHERRY PICK ANYWHERE: Security issue

This API is meant to grant an app complete verification over the
domains it has declared, meaning it will always resolve the domains it
declares for web links.

This can allow an app to take over links that are unowned. Any time a
user selects "Always" when resolving an Intent in the diambiguation
dialog, this API would be called, and all subsequent resolutions of any
domain declared by the app selected would be automatically directed to
that app, with no prompt to the user.

From a quick search, it's possible that all usages of this API are
actually unintended and should be removed. Should be considered for
deprecation in the future.

Bug: 163358811

Test: none, this is not generally testable, see linked bug for context

Merged-In: Iff7f788a83af68c7fbb1c6b9a8be7b47136be2b6
Change-Id: Iff7f788a83af68c7fbb1c6b9a8be7b47136be2b6
2020-10-28 20:59:38 +00:00
TreeHugger Robot
7ce178e6cb Merge "Call DecorView.drawableChanged() in PhoneWindow.setBackgroungDrawable" into rvc-qpr-dev 2020-10-20 17:24:35 +00:00
Alison Cichowlas
7f03b9f0cf When logging ranking positions, use the number of displayed targets
in calculating offset rather than the total number available.

Test: ChooserActivityTest; log inspection
Bug: 169344682
Change-Id: I40c841bf0f3e1cf90b0e4998bde1c9e8009c09c5
(cherry picked from commit b17dbd20c3)
2020-10-08 19:29:50 +00:00
Ming-Shin Lu
44ecc735ec RESTRICT AUTOMERGE Reland "Fix showing keyboard without editor focused.."
Resolve SearchViewTest and InputMethodServiceTest failure when
landing CL[1] in QPR branch.

Also, CL[1] mentioned window focus behavior changes from R,
ignoring STATE_VISIBLE or STATE_ALWAYS_VISIBLE request doesn't enough
to fix unexpected keyboard visible issue when same window focused with
the above softInput flag without editor focus, since there is no
additional unspecified window focus to hide the current soft-input
as prior to R's behavior.

To fix that, we introduced new SoftInputShowHideReason to hide
soft-input when the same window focused without valid editor focus
after screen unlock, in order to align with the behavior prior to R.

[1]: I37ae6e30d1de581ba15131c2a90396b3a522a4d6

Bug: 161506356
Test: atest CtsInputMethodTestCases
Change-Id: Id51863a5b67d5d79d903adf43f19b52bd139e03f
2020-09-28 05:13:09 +00:00
Alison Cichowlas
a102616d48 Merge "Fix handling of bad image previews." into rvc-qpr-dev 2020-09-25 20:55:20 +00:00
Vadim Caen
870c9f7cae Call DecorView.drawableChanged() in PhoneWindow.setBackgroungDrawable
Not calling it result in empty buffer and stuttering during some
animation.

BUG: 158672949
Test: Manual test with ASOS app (see b/151910308) and Boost app
(b/158672949)

Change-Id: Ic5018829d7c7dde388bc928c1f5b3f773cc2f5e4
2020-09-25 11:26:30 +02:00
Song Hu
eedf47cbf5 DO NOT MERGE Put parameterized weights on top two sharing shortcuts of each app as per shortcuts native ranking in PeopleService Sharesheet model.
By default weights are 0 which ensures ranking same as what it is now.

Bug: 168212835
Test: atest com.android.server.people.prediction.SharesheetModelScorerTest
Change-Id: I02eaa5b6a448c33b51e5f4c6acaba93e7a2bd995
2020-09-24 22:18:49 -07:00
TreeHugger Robot
1c98cc2848 Merge "BatteryStatsImpl: Add mBatteryTimeToFull to parcel" into rvc-qpr-dev 2020-09-24 23:40:57 +00:00
Winson Chung
a03cd95a12 Merge "Account for cutouts in system insets (as done previously)" into rvc-qpr-dev 2020-09-24 16:45:18 +00:00
Alison Cichowlas
208b157b8d Fix handling of bad image previews.
When the image preview fails (eg for permissions or timeout) the entire
system area is removed. This prevents the user from using Nearby.

Instead, when the image preview fails, we should hide only the image
preview and leave the rest of the system area intact.

Bug: 168557188
Test: ChooserActivityTest; manual inspection
Change-Id: I49190c1fbc4e25b3d2e2802a90de355bff297f7e
(cherry picked from commit ba027fad91)
2020-09-24 13:18:25 +00:00
Stephane Lee
3d4cba5628 BatteryStatsImpl: Add mBatteryTimeToFull to parcel
Bug: 163342637
Test: Ensure that both Settings/SystemUI ttf are synchronized
Change-Id: I844149d4787e3aef7808bb4f85b0f08d179c5c41
Merged-In: I844149d4787e3aef7808bb4f85b0f08d179c5c41
(cherry picked from commit 4b967a454e)
2020-09-23 23:09:11 -07:00
Winson Chung
7c7d7d4e25 Account for cutouts in system insets (as done previously)
Bug: 167389393
Test: atest DecorViewTest
Change-Id: I75554224171e1e6a32892db53e0243c38a7b5169
Merged-In: I75554224171e1e6a32892db53e0243c38a7b5169
2020-09-23 19:31:13 +00:00
Alison Cichowlas
d6e25d49fd Merge "Add a flag to change the screenshot keychord delay" into rvc-qpr-dev 2020-09-23 15:39:42 +00:00
Ming-Shin Lu
1c62ec882f Merge "DO NOT MERGE Revert "Fix showing keyboard without editor focused in some case..."" into rvc-qpr-dev 2020-09-23 15:29:16 +00:00
Miranda Kephart
488f0a688d Add a flag to change the screenshot keychord delay
Allows overriding the configured keychord delay (the time it takes,
after both the power button and volume down have been pressed, for
a screenshot to be registered/taken). If not set, reads from the
config file (as before). Can be updated with

adb shell device_config put systemui screenshot_keychord_delay <n>

where <n> is the desired timeout, in ms.

Bug: 165267251
Test: manual -- tried setting multiple values, ensured that deleting
the override reverts to the configured value

Change-Id: I2f86abe0332f8072ab4f53baa55f1999aed3865a
Merged-In: I2f86abe0332f8072ab4f53baa55f1999aed3865a
(cherry picked from commit 6e44e9d5b4)
2020-09-23 13:58:15 +00:00
Harpreet "Eli" Sangha
12ed7d3ef0 DO NOT MERGE Revert "Fix showing keyboard without editor focused in some case..."
Reason for revert: b/169215792
Reverted Changes:
I37ae6e30d:Fix showing keyboard without editor focused in som...

Change-Id: Ia370070d42aedc5aa411ec34d4c7aa43c1c65bcf
2020-09-23 10:42:37 +00:00
TreeHugger Robot
12b807701f Merge "Fix showing keyboard without editor focused in some cases (1/2)" into rvc-qpr-dev 2020-09-23 02:51:49 +00:00
Julia Reynolds
71f51c54cd Merge "DO NOT MERGE Revert "Remove app ops indicators from notifications"" into rvc-qpr-dev 2020-09-16 15:09:31 +00:00
Julia Reynolds
8ec5bcb3d0 DO NOT MERGE Revert "Remove app ops indicators from notifications"
This reverts commit 2778b62f1d.

Reason for revert: these icons are still needed

Change-Id: I219af393f3d4cd08e431f38a3b66408e12f258bb
Bug: 163076432
2020-09-16 15:09:03 +00:00
Ming-Shin Lu
e3488605b8 Fix showing keyboard without editor focused in some cases (1/2)
Starts from CL[1] that reporting focus change is now driven by
input instead window manager, so the window focus sequence for the
activity with EditTextPreference dialog after device unlock
in between android Q and android R will be:

[Android Q]:
activity main window (with softInputMode STATE_UNSPECIFIED)
    -> EditTextPreference (with softInputMode STATE_ALWAYS_VISIBLE)

[Android R]:
Only EditTextPreference focused after device unlocked since the window
is the last touched window.

Since in Q, the softInputMode of activity main window is STATE_UNSPECIFIED
, so by default InputMethodManagerService will hide soft-keyboard if there
is no editor focused according this softInputMode flag.

However, in R, because no main window focused, so after EditTextPerference
focused and started the input connection, this will hit a logic to show
soft-keyboard, if mShowRequested is true after the input session created.

Since IMMS#mShowRequested originally is used to show soft-input while
showSoftInput is called but IME service has been unbounded (e.g. switch IME
or IME service killed), so use this flag can show soft-input aftter
service re-connected.  For the issue case, we should ignore
STATE_ALWAYS_VISIBLE since the app's targetSdkVersion is P+ and no
editor focus as CL[2] expectation.

To fix that, we introduced new SoftInputShowHideReason to hide
soft-input when the same window focused without valid editor focus
after screen unlock, in order to align with the behavior prior to R.

[1]: Iff0b88a05441b29834741aa3dfae31d55871ddd6
[2]: I56682c7dee71d461687b9e80ab746d382fd55e0c

Bug: 161506356
Fix: 162444230
Test: atest CtsInputMethodTestCases
Merged-In: I37ae6e30d1de581ba15131c2a90396b3a522a4d6
Change-Id: I37ae6e30d1de581ba15131c2a90396b3a522a4d6
(cherry picked from commit 1ef07dffe3)
2020-09-15 18:50:11 +08:00
Ivan Chiang
5afa764557 Revoke the uri permission when the file is deleted
When the file is deleted, renamed or moved, revoke all uri
permissions with the file

Bug: 157474195
Test: manual test with DocumentsUI
Test: atest DocumentsTest#testAfterMoveDocumentInStorage_revokeUriPermission
Change-Id: I4ffb183630aadb2d87b0965e8cecf88af15f4534
Merged-In: I4ffb183630aadb2d87b0965e8cecf88af15f4534
(cherry picked from commit 9efd606f43)
2020-08-26 06:29:00 +00:00
Ahan Wu
1a1c93f964 Handle NPE in LocalImageResolver to avoid crashing systemui
ContentResolver#openInputStream may return null, and may lead to
systemui keeps crashing, handle null to avoid this case.

Bug: 163412636
Test: manually
Change-Id: Ie149b75d4445b37afac82c8351a32cb17442936d
2020-08-21 14:18:08 +08:00
Julia Reynolds
2778b62f1d Remove app ops indicators from notifications
Test: atest
Bug: 163076432
Change-Id: I5b7514f765811ffd3b0aca63d0108591755974ab
Merged-In: I5b7514f765811ffd3b0aca63d0108591755974ab
2020-08-14 15:02:02 +00:00
TreeHugger Robot
178e18a7fc Merge "Migrate PiP logs to UiEvent" into rvc-qpr-dev 2020-08-11 18:49:47 +00:00
Miranda Kephart
8a912c716b Merge "Make screenshot process unbind correctly" into rvc-qpr-dev 2020-08-11 18:00:13 +00:00
Miranda Kephart
6bb575bab1 Make screenshot process unbind correctly
There's a bug in ScreenshotHelper that causes the process not to
unbind properly. Now that the screenshot connection is kept track
of by the class, we don't need to compare its value at the
beginning and end of the started service before closing the
connection.

This also fixes an issue where screenshots didn't work right,
immediately after switching users (since the process is now
closed correctly, a new one can begin for the secondary user).

Bug: 158303623
Bug: 160355802
Fix: 158303623
Fix: 160355802
Test: manual; tested single screenshots and multiple in succession;
made sure that after switching users screenshots could be taken
immediately.

Change-Id: Idf25c6a60bdde8ab970c4af68884de798159ef3f
2020-08-11 09:32:29 -04:00
Susi Kharraz-Post
ce030f1d75 Fix argument order in Sharesheet Started logging
Argument order for westworld logging number of direct and app targets
provided by the app got turned around in the function call. Fixing the
order by moving the lines

Bug: 162982477
Test: manual
Change-Id: I23d0d2861c169b8e6eb26ce3040913db42f3e01f
(cherry picked from commit 6eb59aa87e)
2020-08-07 16:20:42 +00:00
Fabian Kozynski
515db30387 Merge "Separate mic + camera from location" into rvc-qpr-dev 2020-08-07 13:22:04 +00:00
Hongwei Wang
01b7a61338 Migrate PiP logs to UiEvent
Per go/uievent, migrated PiP logs to UiEvent and also in this change
- Deprecates counterpart proto definitions in metrics_constants
- Record PiP logs from SysUI only, deprecates what's used to be in WM

Changes to the actual logging
- No longer logs the actual aspect ratio
- Disables logging the change of aspect ratio since there are flood of
  events can trigger this
- Splits menu visibility log to SHOW_MENU and HIDE_MENU
- Splits removal of PiP to TAP_TO_REMOVE and DRAG_TO_REMOVE
- No longer logs supportsEnterPipOnTaskSwitch
- Adds new RESIZE logging

Bug: 147508020
Test: $ANDROID_HOST_OUT/bin/statsd_testdrive -terse 90
Merged-In: I805d16ae6f30c07270b743f7ae1e66cbbd121131
Change-Id: I805d16ae6f30c07270b743f7ae1e66cbbd121131
2020-08-05 13:42:16 -07:00
Fabian Kozynski
e534fb7782 Separate mic + camera from location
The different states are:
- No indicators enabled. Location is displayed using
LocationControllerImpl
- Only mic + camera indicators. Location is displayed using
LocationControllerImpl
- All indicators enabled. LocationControllerImpl is ignored.

Also, hardwire OP_MONITOR_HIGH_POWER_LOCATION as user sensitive.

Fixes: 162552566
Test: atest com.android.systemui.privacy
Test: manual

Change-Id: I1e7f62d6fccb4a3bc4fdf2a47a8d5c8a4f55421d
Merged-In: I1e7f62d6fccb4a3bc4fdf2a47a8d5c8a4f55421d
2020-08-05 13:54:42 -04:00
Zhen Zhang
7a6365ae7e Fix bug: NullPointerException in ChooserActivity
Add a null check for mResolverDrawerLayout in ChooserActivity

Bug: 162900698
Test: ChooserActivityTest
Change-Id: Id2b4442a0c5f22e1ecff04a1d20b48784ecc47dd
2020-08-05 16:13:51 +00:00
Winson Chung
9205f447b5 Merge "Only apply back gesture device config if there are existing insets" into rvc-d1-dev am: f7a4faa241
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12272603

Change-Id: Id6d570a78ed4e9d057fffe5f15b75234b2c2f4c1
2020-07-31 16:53:06 +00:00
Winson Chung
a8a07f1f40 Only apply back gesture device config if there are existing insets
Bug: 161995292
Test: Change navigation modes and verify the insets are correct
Change-Id: I4d940099b7fdc00c129f60dc6b3d0cb470b7f42e
2020-07-30 17:35:17 +00:00
Fabian Kozynski
9a85dc9c0a Merge changes from topic "permission_chip" into rvc-qpr-dev
* changes:
  Restricts notified app ops based on flags
  Add back privacy chip
2020-07-23 13:45:26 +00:00
Zhen Zhang
cfeb7627b7 Merge "Scroll the hiding page to top on tab changed in sharesheet" into rvc-qpr-dev 2020-07-20 19:29:20 +00:00
Fabian Kozynski
d074a54435 Add back privacy chip
This adds back the privacy chip classes (Controller and view).

Change to using Executors and DeviceConfigProxy, also fix tests that
were flaky before.

Test: SystemUITests
Bug: 160966908
Change-Id: Id3e5981a87c33a8cabe7ce348f9512d81ad2b1d8
Merged-In: Id3e5981a87c33a8cabe7ce348f9512d81ad2b1d8
2020-07-20 14:27:28 -04:00
Adrian Roos
f9ea2989dd Merge "Fix hiding keyboard animation stuck while dialog dismissing." into rvc-dev am: dac09ee7fe am: 7df40a82f6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12174530

Change-Id: I252e2c0b62cf955c7ce2c7fafde18e0b51a9743e
2020-07-17 21:40:18 +00:00
Adrian Roos
a24622cfcd Fix hiding keyboard animation stuck while dialog dismissing.
When dismissing a dialog with EditText focused and keyboard shown,
the keyboard does not get correctly dismissed.

This happens because after CL[1] landed, returning to the  activity won't start
new input connection, and the activity will thus not regain control over
the IME.

This fix restores the previous behavior, where  IMM will start a fake input
connection even without an editor.

[1]: I1ef3d341af9d473d94d52fd1890deafbae2bc9e1

Fix: 161273049
Test: atest CtsInputMethodTestCases
Test: manual as follows
     0) Have some files downloaded in the device
     1) Launch Files app > Browse > Click Internal Storage
     2) Long press on any file > From menu, click "Rename"
     3) Enter some name with soft keyboard and click "OK"
     4) Expect Keyboard should hide

Change-Id: I022ad658844142ff4a4cf3b91953013f2bfbb58a
2020-07-17 18:09:13 +02:00
Zhen Zhang
068ddf7b06 Scroll the hiding page to top on tab changed in sharesheet
After the tab changed, ResolverDrawerLayout will lose reference of the
hidden page which can cause the page not able to scoll back to top.
Automatically scroll on tab changed to avoid that situation.

Bug: 160886554
Test: manually test; atest ChooserActivityTest; atest
ResolverActivityTest

Change-Id: I1a8ba72f6b1dcb9bca19262b97983788001d715b
2020-07-16 14:06:35 -07:00
TreeHugger Robot
83d9908e54 Merge "Updated docs for IInlineSuggestionsRequestCallback.aidl." into rvc-dev am: f65210f9ca am: eecfa86e8c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12142032

Change-Id: I70c1072749ecd64c755a2f3e9f0fea95a6ab9bcd
2020-07-14 23:32:27 +00:00
TreeHugger Robot
f65210f9ca Merge "Updated docs for IInlineSuggestionsRequestCallback.aidl." into rvc-dev 2020-07-14 23:02:42 +00:00
Adam He
4a1935d990 Updated docs for IInlineSuggestionsRequestCallback.aidl.
Fixes: 160729678
Test: atest android.autofillservice.cts.inline
Change-Id: Ie49267a594524651f0965296c164f7d1e0628cee
2020-07-13 15:28:28 -07:00
TreeHugger Robot
a7f7189c11 Merge "Don't update height if recycler view was scrolled" into rvc-qpr-dev 2020-07-13 13:22:08 +00:00
Antoan Angelov
f3c9998a48 Merge "Add bottom offset to the intial padding rather than accumulating it." into rvc-qpr-dev 2020-07-13 13:14:32 +00:00