Commit Graph

64993 Commits

Author SHA1 Message Date
TreeHugger Robot
c45de5abfa Merge "Check for mSurfaceController in setWallpaperPositionAndScale" into rvc-dev 2020-05-20 11:51:32 +00:00
TreeHugger Robot
f2856e3be5 Merge "Revert "AudioService: permission for volume adjustment to lowest values"" into rvc-dev 2020-05-20 11:35:42 +00:00
TreeHugger Robot
e3041c9a16 Merge "Fix NPE in LegacyGlobalActions" into rvc-dev 2020-05-20 11:31:46 +00:00
TreeHugger Robot
135779c8bd Merge "MediaRouter2ServiceImpl: Remove unnecessary notification to managers" into rvc-dev 2020-05-20 08:51:37 +00:00
arthurhung
2039495076 Fix NPE in LegacyGlobalActions
The dialog would be assigned by 'createDialog', we should use local
varible to prevent null pointer.

Bug: 156747189
Test: atest GlobalActionsImeTest
Test: open chrome, browsing and open global menu.
Change-Id: I572426158c63bbce22c79dc2e0e642914da0fd24
2020-05-20 16:41:19 +08:00
Mark Chien
455d373861 Revert "AudioService: permission for volume adjustment to lowest values"
This reverts commit a8f97ffdaa.

Reason for revert: break git_master of errorprone target

out/soong/.intermediates/frameworks/base/services/core/services.core.unboosted/android_common/errorprone/srcjars/frameworks/base/services/core/java/com/android/server/audio/AudioService.java:4710: error: [EqualsNaN] == NaN always returns false; use the isNaN methods instead
                MIN_STREAM_VOLUME[AudioSystem.STREAM_ALARM], deviceForAlarm) == Float.NaN) {
                                                                             ^
    (see https://errorprone.info/bugpattern/EqualsNaN)
  Did you mean 'if (Float.isNaN(AudioSystem.getStreamVolumeDB(AudioSystem.STREAM_ALARM,'?

Bug: 157108450

Change-Id: Icf74dcbefccee6138473101e8dc23fba35faf5ce
2020-05-20 06:18:37 +00:00
Kevin Chyn
e6fe6013cb Merge "linkToDeath on BiometricPrompt#authenticate" into rvc-dev 2020-05-20 05:49:16 +00:00
TreeHugger Robot
a759c596fa Merge "Fix NPE in isTrimmable" into rvc-dev 2020-05-20 05:40:12 +00:00
TreeHugger Robot
345d68d164 Merge "WindowProcessController: optimize locking" into rvc-dev 2020-05-20 05:27:46 +00:00
Hyundo Moon
38d06dffd3 MediaRouter2ServiceImpl: Remove unnecessary notification to managers
When registering a new manager, unnecessary notifications happen.
This CL removes them.

Bug: 145490491
Test: Passed CTS and mediaroutertest
Change-Id: I1d309ea47a537cb855639be9a72268111851ef2e
2020-05-20 14:24:06 +09:00
Ming-Shin Lu
3d9abd8bb3 Merge "Set correct screenBounds for RemoteAnimation" into rvc-dev 2020-05-20 01:55:56 +00:00
Jean-Michel Trivi
f2a05b6210 Merge "AudioService: permission for volume adjustment to lowest values" into rvc-dev 2020-05-20 01:45:05 +00:00
TreeHugger Robot
f2d6baac91 Merge "Compare containers in mChangingContainers with Task for change transitions" into rvc-dev 2020-05-20 01:22:04 +00:00
Hai Zhang
e0f524be6f Merge "Generating missing permission state inside restorePermissionState()." into rvc-dev 2020-05-19 22:07:02 +00:00
Kevin Chyn
1c042ba4b9 linkToDeath on BiometricPrompt#authenticate
It's possible that the client dies. Currently the AuthSession doesn't
know about this, so it doesn't do the following. This CL adds them.

1) Close the SysUI dialog
2) Clean up any existing state with individual sensors

Test: atest com.android.server.biometrics
Test: 1) Use a face unlock device
      2) BiometricPromptDemo, start authentication
      3) Wait for auth to time out (try again button gets shown)
      4) Kill the calling app, e.g.
         `adb shell killall com.example.android.biometric`
      5) Start another activity to trigger task stack change, e.g.
         `adb shell am start -a ...`
      6) Start another authentication, e.g.
         `adb shell am start -a android.app.action.CONFIRM_DEVICE_CREDENTIAL`
      7) Authenticate, reject, or wait for timeout
Test: Repeat the above, but kill the app when the sensor is active
      (before auth times out in step 3)

Before: Upon step 6, no authentication UI is shown. Upon 7, SysUI would
        crash.

After: Upon step 6, a new authentication UI is shown. Upon 7, no crash
       observed, and auth behaves as expected.

Bug: 156719497

Change-Id: Ib573466edac7dd95a8c031e0533cbca693b806f6
Merged-In: Ib573466edac7dd95a8c031e0533cbca693b806f6
2020-05-19 14:45:22 -07:00
Jean-Michel Trivi
a8f97ffdaa AudioService: permission for volume adjustment to lowest values
Define an attenuation threshold under which the
MODIFY_AUDIO_SETTINGS permission is required to adjust volume.
  Verify permission at the interface of audio service, and
propagate this information so its used when getting a valid
index during a volume adjustment or set.
  Make the audio service dump display the min index when it
differs from the normal min index.
  Enforcement is only for STREAM_ALARM.

Bug: 137015603
Test: use POC app in bug, verify ALARM volume not at 1 with \
      adb shell dumpsys audio

Change-Id: I083a26fd8eeebd4e5434ed02a4a803cbb920ab84
2020-05-19 14:07:43 -07:00
TreeHugger Robot
a9c6632f54 Merge "Fix typo in TEST_MAPPING" into rvc-dev 2020-05-19 20:10:39 +00:00
TreeHugger Robot
db48450e84 Merge "Fix parsing sCachedPackageReadCount" into rvc-dev 2020-05-19 18:57:33 +00:00
Winson Chung
719e2c7a3b Merge "Revert "System Bars animation for fixed rotation transform"" into rvc-dev 2020-05-19 18:53:22 +00:00
Winson Chung
77de74d539 Revert "System Bars animation for fixed rotation transform"
This reverts commit dca5b93bf9.

Reason for revert: b/156868543

Bug: 156868543

Change-Id: Ia59450ef160021494a114715a0035437b28e8d00
2020-05-19 18:45:02 +00:00
TreeHugger Robot
fa01d2ad12 Merge "Flip ENABLE_DYNAMIC_PERMISSIONS." into rvc-dev 2020-05-19 16:42:36 +00:00
Winson
46220780ba Fix parsing sCachedPackageReadCount
This was moved to PackageCacher, but the old and unused counter
was not removed.

Bug: 154310064

Test: manual device reboots and logs cached count >0

Change-Id: I32fdb4b8fccd281fe61c64f231cb0ba154934679
2020-05-19 09:37:36 -07:00
Jeff Sharkey
60e1469c58 Flip ENABLE_DYNAMIC_PERMISSIONS.
Now that the underlying deadlock should be resolved, we can attempt
to enable the dynamic permissions checking.

Bug: 115619667
Test: atest android.appsecurity.cts.ExternalStorageHostTest
Change-Id: If68f08a8e4ffb7518f923108236e2635ea2b8bcd
2020-05-19 09:15:51 -06:00
Wale Ogunwale
02c67b119e Merge "Avoid wm<->am deadlock when checking uri permission" into rvc-dev 2020-05-19 15:00:53 +00:00
Wale Ogunwale
d638cd6164 Avoid wm<->am deadlock when checking uri permission
Bug: 115619667
Test: N/A
Change-Id: I43a868b261eb1546464c401b6ec1417870fa6f9c
2020-05-19 15:00:34 +00:00
Silvia Vinyes
197709093a Merge "Fix app compaction bug and add tests." into rvc-dev 2020-05-19 14:17:07 +00:00
Kazuki Takise
6632259c38 Compare containers in mChangingContainers with Task for change transitions
Currently, it's trying to find an activity in mChangingContainers,
but as Task is added for change transitions, so it ends up getting
into the else statement and incorrectly set the animation CLOSING.

Bug: 157015435
Test: go/wm-smoke
Change-Id: I5be317f2e4adeceeeb06d4a1ec432d014685cf35
2020-05-19 22:48:05 +09:00
TreeHugger Robot
9cbcb69d59 Merge "Fix returning an occluded activity below boundary" into rvc-dev 2020-05-19 11:03:56 +00:00
Louis Chang
62cdfe75f6 Fix returning an occluded activity below boundary
WindowContainer#getActivity() was returning null if there was no
matching activity or hit the boundary. Since we were unable to
tell the difference between the two cases, we would continue looking
for a matching activity from higher level window containers.

Take below hierarchy for example, #getActivity() returns null if
the boundary was TopActivity. So, we were kept looking for the matching
activity from Task#2 and returns BottomActivity.

RootTask
  - Task#1
     - TopActivity
  - Task#2
     - BottomActivity

Bug: 156014697
Test: start activity from recents in split-secondary
Change-Id: Ic344e8c1c47e9fa05c4de60be8c6b30f75cdb0bc
2020-05-19 16:23:15 +08:00
Charles Chen
7d550c4fc4 Fix NPE in isTrimmable
Previous CL[1] makes the root home task nullable, which causes NPE
in RecentTask#isTrimmable. This CL adds null checks on the method and
other callers which don't have checks, and also marks
TaskDisplayArea#getRootHomeTask as @Nullable.

[1]: 3388bd2a0b

Test: atest RecentTasks RecentsAnimationControllerTest
Test: atest TaskDisplayAreaTests WindowStateTests
fixes: 155100679
Change-Id: I8a59fbcb99810172a3b3192917d24e5122a02476
2020-05-19 08:15:58 +00:00
Kyunglyul Hyun
e54c3c811d Merge "Log info on system route provider" into rvc-dev 2020-05-19 08:11:34 +00:00
Fiona Campbell
4736a08273 Merge "Fix brightness curve when user sets slider to min." into rvc-dev 2020-05-19 07:50:42 +00:00
TreeHugger Robot
1d867453ca Merge "add conversation flags to channel atom" into rvc-dev 2020-05-19 06:51:54 +00:00
Suprabh Shukla
54f0b9e24c Merge "Fix unsuspend from dialog on secondary users" into rvc-dev 2020-05-19 06:39:48 +00:00
Kyunglyul Hyun
5ff55ec278 Log info on system route provider
This CL logs provider info and session info of the system route provider
for debugging purpose.

Set DEBUG = true to gather logs for a while.

Bug: 156723680
Test: manually checking log
Change-Id: I4b020e951ff3b5bd7350cc733c822c702526e260
2020-05-19 15:36:40 +09:00
Kyunglyul Hyun
c9d20f317d Merge "Send last discovery preference to provider service" into rvc-dev 2020-05-19 06:32:57 +00:00
Philip P. Moltmann
088ef5e3ff Merge "Check dump permission for "dumpsys permissionmgr"" into rvc-dev 2020-05-19 02:54:21 +00:00
Chris Li
eafbb325eb Merge "Use getOrCreateRootHomeTask in ActivityStartController" into rvc-dev 2020-05-19 02:35:26 +00:00
JW Wang
33285aff67 Merge "Add logs for debugging flaky test" into rvc-dev 2020-05-19 02:03:59 +00:00
TreeHugger Robot
58657c7c10 Merge "Report resizeTask failure as boolean result" into rvc-dev 2020-05-19 01:39:54 +00:00
Tim Murray
c944f1e419 WindowProcessController: optimize locking
No need to lock if isCached is true. Move to mGlobalLockWithoutBoost to
avoid priority inheritance overhead.

Test: boots, works
Bug: 155924232
Change-Id: Iadf6fb14088a71f21ce015c014516bf07235a96e
2020-05-18 17:26:39 -07:00
Hai Zhang
4c0d15b958 Generating missing permission state inside restorePermissionState().
PackageSettings.pkg isn't scanned yet when reading package settings,
but the generation needs information about the package, so we need to
defer it to restorePermissionState().

Fixes: 156204380
Test: devices boots
Change-Id: Id77222b2843395bbba17794a275df641d0d85d63
2020-05-18 16:24:15 -07:00
Silvia Vinyes
acee2d53b4 Fix app compaction bug and add tests.
Fixing b/154317004
App Compaction has a heuristic that ensures the delta in memory between
two full compactions is high enough. The map that keeps track of previous
compactions is missing some entries.

There is a map that keeps entries with previously compacted processes.
When trying to compact again one of those processes, the old entry is
removed and a new one inserted. When a compaction was not made because
of additional conditions / heuristics, the entry is removed but no new
entry is inserted again - as no new compaction occurred. We need to make
sure old entries are kept if the current compaction is not successful and
if it is successful, the map order should reflect it was the most recent
insertion.


Test: atest CachedAppOptimizerTest
Bug: 154317004

Change-Id: I0d4a364928fee162289098c4d4ea0005781bccfd
2020-05-18 23:14:40 +00:00
Chris Li
f95a776459 Use getOrCreateRootHomeTask in ActivityStartController
Allow #getOrCreateRootHomeTask() to take argument onTop for the position
to create the home stack at.

Also don't allow untrusted secondary display to have system decorations.

Bug: 153624902
Test: atest CtsWindowManagerDeviceTestCases:MultiDisplaySystemDecorationTests
Change-Id: I12d0cfcf2436da3619abd314febddb05610e57f2
2020-05-18 15:52:08 -07:00
Patrick Baumann
4d61690ba0 Merge "Remove usages of Slog.wtf" into rvc-dev 2020-05-18 21:39:57 +00:00
Ruchir Rastogi
e6c5da62fb Merge "Refactor puller of {Mobile|Wifi}BytesTransfer(ByFgBg)" into rvc-dev 2020-05-18 20:55:27 +00:00
Collin Fijalkovich
acb2bba925 Merge changes from topic "dump-cacheinfo" into rvc-dev
* changes:
  Add cache debugging information to bugreports.
  Maintain global list of caches; purge on low memory
2020-05-18 20:52:43 +00:00
TreeHugger Robot
8c9dc15e4f Merge "Only call onDisplayAreaInfoChanged if config actually changed" into rvc-dev 2020-05-18 19:26:41 +00:00
Fiona Campbell
d7ab949588 Fix brightness curve when user sets slider to min.
The brightness spline was setting the entire curve to 0.0f. This was due
to the min and max points of point x+1 being constrained to a factor of
the brightness x. If this happens to be 0.0f, the brightness curve will
never increase.

Bug: 153799222

Test: AutomaticBrightnessControllerTest

Change-Id: Id29389e7fc17b402d2f1bd581a805a6067eac4bb
2020-05-18 20:15:36 +01:00
Philip P. Moltmann
58c52d4720 Check dump permission for "dumpsys permissionmgr"
Test: dumpsys permissionmgr
Fixes: 156434486
Change-Id: I76f72c6a11167d1ed5155fec1ef7ab7a1ba165d4
2020-05-18 12:06:13 -07:00