We trade off increased cost of (rare) mutations of the set of "bad" apps
in order to make the core lookup "is this specific app bad?" lock-free.
Locking discipline turned out to be a dominant cost in a very hot code
path within the running system, even uncontended.
Bug: 175339368
Bug: 163297662
Test: atest ActivityManagerServiceTest
Change-Id: I8803a177d46b01b86897f1e8d0966eb2452849fd
Merged-In: I8803a177d46b01b86897f1e8d0966eb2452849fd
Currently, we keep the process up even if the user switches,
meaning that in some cases (if the user is switched while the
screenshot UI is up) we will save images to the wrong profile.
This change makes ScreenshotHelper listen for user switches and
close the screenshot service, so that a new screenshot is
guaranteed to be constructed with the correct user's context.
Bug: 170474245
Fix: 170474245
Test: manual -- verified bad state occurs if user switches within
the timeout period, ensured that screenshots work immediately
after switching with this change.
Change-Id: I9d32d0928e6c2bda161d04555438d0dd7afef0ba
(cherry picked from commit 7ef1a5dd15)
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)
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
Change-Id: I2fd5255e903932c03a35ae463b0eff3840dc81bd
Merged-In: I2fd5255e903932c03a35ae463b0eff3840dc81bd
Test: manual model test and getting the results
Bug: 150170384
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
in calculating offset rather than the total number available.
Test: ChooserActivityTest; log inspection
Bug: 169344682
Change-Id: I40c841bf0f3e1cf90b0e4998bde1c9e8009c09c5
(cherry picked from commit b17dbd20c3)
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
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
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
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)
Bug: 163342637
Test: Ensure that both Settings/SystemUI ttf are synchronized
Change-Id: I844149d4787e3aef7808bb4f85b0f08d179c5c41
Merged-In: I844149d4787e3aef7808bb4f85b0f08d179c5c41
(cherry picked from commit 4b967a454e)
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)
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)
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)
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
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
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)
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
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
Add a null check for mResolverDrawerLayout in ChooserActivity
Bug: 162900698
Test: ChooserActivityTest
Change-Id: Id2b4442a0c5f22e1ecff04a1d20b48784ecc47dd
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
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
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