Commit Graph

62501 Commits

Author SHA1 Message Date
Automerger Merge Worker
0d244fe4aa Merge "Allow location when Car mode is active." into rvc-dev am: 969e1e2759
Change-Id: I3ff7f20b11d86dbc426795d278fd981c324ba7af
2020-02-25 21:58:01 +00:00
Kweku Adams
969e1e2759 Merge "Allow location when Car mode is active." into rvc-dev 2020-02-25 21:52:27 +00:00
Automerger Merge Worker
2895bf9d70 Merge "Atom for when fgs accesses appop" into rvc-dev am: 10398d29f3
Change-Id: I05bd0d910df7d69a6a58cf32a4ebfdab43612e1a
2020-02-25 20:11:48 +00:00
TreeHugger Robot
10398d29f3 Merge "Atom for when fgs accesses appop" into rvc-dev 2020-02-25 19:59:16 +00:00
Automerger Merge Worker
81a3d0e2af Add ID to InputEvent. am: c8362b24f6
Change-Id: I1041d8f81e49b7f9653061ef98e4fbe3d581d89d
2020-02-25 19:23:13 +00:00
TreeHugger Robot
0253cc8f2f Merge changes from topics "input_events_id", "wire_input_event_id" into rvc-dev
* changes:
  Send input event ID in InputEventSender.
  Add ID to InputEvent.
2020-02-25 19:20:17 +00:00
Automerger Merge Worker
82abc4fb3b Merge changes from topic "new-task-snapshots-rvc-dev" into rvc-dev am: 81a320279e
Change-Id: I63d105659a7578774a9594609117939802b33a2d
2020-02-25 18:34:42 +00:00
Automerger Merge Worker
4230ed12d1 Merge "Fix Display SurfaceControl leak" into rvc-dev am: 87293fda8d
Change-Id: I6cefa46725e200f33ba92b7505b3a0d699694deb
2020-02-25 18:32:41 +00:00
Peter Kalauskas
81a320279e Merge changes from topic "new-task-snapshots-rvc-dev" into rvc-dev
* changes:
  Disable reduced scale if reduced scale config is 0
  Store original task width and height instead of scale
2020-02-25 18:29:50 +00:00
Chavi Weingarten
87293fda8d Merge "Fix Display SurfaceControl leak" into rvc-dev 2020-02-25 18:11:54 +00:00
Automerger Merge Worker
d1bb30c9b7 Merge "Fix the delay time for Assistant" into rvc-dev am: 2ae4ec02f9
Change-Id: I71a25493dbd2f6d4066f1aa4b04c1ede604734ee
2020-02-25 17:29:22 +00:00
Santhosh Thangaraj
2ae4ec02f9 Merge "Fix the delay time for Assistant" into rvc-dev 2020-02-25 17:26:10 +00:00
Adam Bookatz
38767932a2 Atom for when fgs accesses appop
statsd logs when an sensitive appop is accessed while a foreground
service is held. These appops include
OP_FINE_LOCATION
OP_COARSE_LOCATION
OP_RECORD_AUDIO
OP_CAMERA

It logs the number of times each of these appops is requested per session
during which the uid holds any foreground service.
Appops requested while the app's process state is TOP are ignored.

Also, the pre-existing ForegroundServiceStateChanged atom has an
additional field that logs whether the fgs is considered 'in-use' in the
context of being allowed while-in-use permissions.

Bug: 149497535
Test: atest UidAtomTests#testForegroundServiceState UidAtomTests#testForegroundServiceAccessAppOp
Test: manually monitor: adb shell cmd stats print-logs && adb logcat -v uid -s statsd | grep "statsd  : {" | egrep '\((60|256)\)'

Change-Id: I991a427dc2ab00399188b10b266ab2d9aa92696d
Merged-In: I991a427dc2ab00399188b10b266ab2d9aa92696d
(cherry picked from commit 0c8637c067)
2020-02-25 17:09:48 +00:00
Automerger Merge Worker
75e427a392 Merge "Grants visibility on uri permission grant" into rvc-dev am: cb2d2ec786
Change-Id: Iab7d5741cf1557632968ae3f58d77366a45c553c
2020-02-25 15:58:15 +00:00
Patrick Baumann
cb2d2ec786 Merge "Grants visibility on uri permission grant" into rvc-dev 2020-02-25 15:52:29 +00:00
Patrick Baumann
710d720db7 Grants visibility on uri permission grant
When permission is granted to another app via URI, we implicitly grant
visibility to that app of the app ID that that URI resolves to.

Test: atest AppSecurityTests
Fixes: 149781706
Fixes: 145677500
Exempt-From-Owner-Approval: Owner approved prior to cherry-pick
Change-Id: I7c8967a4464fd821e4f95d8eb6c0bcfadadb912e
2020-02-25 15:48:30 +00:00
Automerger Merge Worker
dc33dcb958 Merge "Squash same ApplicationInfo's in Parcel" into rvc-dev am: 9577cd78ff
Change-Id: Idd92356c84cf7d891083f08ee2ac230a740e52c9
2020-02-25 15:20:36 +00:00
Makoto Onuki
9577cd78ff Merge "Squash same ApplicationInfo's in Parcel" into rvc-dev 2020-02-25 15:17:14 +00:00
Automerger Merge Worker
484225b60c Create DreamManager System Server TestApi am: 641e2e6361
Change-Id: I366662d7163459992e688b8303dce0023621ee19
2020-02-25 12:41:41 +00:00
Galia Peycheva
641e2e6361 Create DreamManager System Server TestApi
Bug: 141771803
Bug: 133216167

Test: atest DreamManagerServiceTests
Test: make checkbuild

Merged-In: I937061138bc8ccaf4475674f00331c3fe1c5a495
Change-Id: I937061138bc8ccaf4475674f00331c3fe1c5a495
(cherry picked from commit 4467c53c11)
2020-02-25 12:32:02 +00:00
Automerger Merge Worker
97606037b0 Merge changes Id71b4cbc,I8dff0a12,Ife3d1390 into rvc-dev am: a72d7e53e6
Change-Id: I66bcc662fb1d31cd664003135c173fcf67d054d5
2020-02-25 10:25:58 +00:00
Automerger Merge Worker
b378a53f8b Make DreamService use an Activity am: 6861e91b84
Change-Id: I38393018a7afd2accbf20baae755db21183ab42c
2020-02-25 10:25:55 +00:00
Automerger Merge Worker
fca6e69731 Clean up dreamland am: a8e4641296
Change-Id: I7c068c9617f8f61dc5e4147e537a02ab873593e8
2020-02-25 10:25:51 +00:00
Galia Peycheva
a72d7e53e6 Merge changes Id71b4cbc,I8dff0a12,Ife3d1390 into rvc-dev
* changes:
  Add startDreamActivity request verification
  Make DreamService use an Activity
  Clean up dreamland
2020-02-25 10:11:21 +00:00
Automerger Merge Worker
d5c6dffae6 Merge "Change checking rule in startArcAction(false) for HDMI CTS" am: 3adddd63a7 am: 10d8d7109f
Change-Id: Ic503411c200d2c740a21e388372cb16b99e5141f
2020-02-25 08:41:48 +00:00
Automerger Merge Worker
10d8d7109f Merge "Change checking rule in startArcAction(false) for HDMI CTS" am: 3adddd63a7
Change-Id: Ia4a6cd36b0404f24768a432802395d2d34277b44
2020-02-25 08:26:40 +00:00
Austin Shin
3adddd63a7 Merge "Change checking rule in startArcAction(false) for HDMI CTS" 2020-02-25 08:17:07 +00:00
Galia Peycheva
52e8922e8a Add startDreamActivity request verification
The ActivityTaskManagerTestService has a special method to start a
DreamActivity. This CL adds a verification check before the activity is
started to check that the caller is the currently active dream
component.

Bug: 133216167

Test: atest DreamManagerServiceTest

Merged-In: Id71b4cbc57c6569f58b6d906cc8361c104a507dc
Change-Id: Id71b4cbc57c6569f58b6d906cc8361c104a507dc
(cherry picked from commit 20dc51820a)
2020-02-25 07:57:09 +00:00
Galia Peycheva
6861e91b84 Make DreamService use an Activity
Currently, the DreamService uses a floating Window to display the
content of the dream on the screen. This introduces difficulties in the
interactions with the Assistant application, which is an activity.
By design, if the Assistant is invoked while the device is dreaming, the
Assistant should be shown on top. However, since floating windows are
always drawn on top of all activities, the Assistant can't be shown on
top of the Dream.

Here, we migrate the implementation of the DreamService to use an
Activity (DreamActivity). Since the screensaver application is not part
of the framework, we can't declare the activity in their AndroidManifest.xml.
Therefore, we start the dream activity with a dedicated method in
ActivityTaskManagerService.

Bug: 133216167
Test: 1. m && ./vendor/google/tools/flashall
      2. Go to Settings > Device Preferences > Screensaver > Start now
      3. Verify dream appears
      4. Click any key to wake up the dream
      5. Verify that dream disappears

Merged-In: I8dff0a124cd1b41fb925a73528305431b49ee06d
Change-Id: I8dff0a124cd1b41fb925a73528305431b49ee06d
(cherry picked from commit 148478a85e)
2020-02-25 07:56:28 +00:00
Gavin Corkery
fb7bda9734 Merge "Change checkpointing retry count to 2" into rvc-dev 2020-02-25 07:56:01 +00:00
Winson Chiu
d012f7bee6 Merge "Use correct PackageSetting for dexopt calculation" into rvc-dev 2020-02-25 07:55:52 +00:00
Martijn Coenen
c8a208f571 Merge "Don't crash system_server if fixupAppDir() fails." into rvc-dev 2020-02-25 07:53:57 +00:00
Joshua Duong
b76d7aa6bc Merge "Remove key from adb_keys if user forgets the key." into rvc-dev 2020-02-25 06:10:49 +00:00
TreeHugger Robot
20ea7f5258 Merge "Introduce SoftInputShowHideHistory" into rvc-dev 2020-02-25 05:35:25 +00:00
Amy Zhang
7ff127e897 Merge changes from topic "trm-impl-rvc" into rvc-dev
* changes:
  Fix issues in register/unregister client API implementation
  Add a TRM use case priority hints info object
  Add requestFrontend implementation in TunerResourceManager
  Implement TRM setFrontendInfoList logic with unit tests
2020-02-25 05:02:44 +00:00
TreeHugger Robot
395262cbb4 Merge "Trim "android.permission." from permission name to reduce reporting footprint." into rvc-dev 2020-02-25 04:21:02 +00:00
TreeHugger Robot
0cbb2687ed Merge "Move PiP animation to SysUI package" into rvc-dev 2020-02-25 03:10:24 +00:00
TreeHugger Robot
ba58fd615f Merge "Add Option To Prevent Wake On Back Key Press" into rvc-dev 2020-02-25 02:10:32 +00:00
Winson
03f72240fe Use correct PackageSetting for dexopt calculation
The PackageSetting object is sometimes copied during
scan/install and will not match the reconciledPkg's pkgSetting.

This meant the usesLibrary parsing assigned the values to one
PackageSetting object, but dexopt read from the other, copied
object.

Unfortunately this copy logic leaves the two settings out of
sync and thus the isUpdatedSystemApp flag has to be copied
between them.

All of this would be great to resolve in a future refactor.

Bug: 150142306

Test: adb install -r {out_of_blueline_target}/product/app/CalculatorGooglePrebuilt/CalculatorGooglePrebuilt.apk
    installs correctly, with dexopt run with the correct paths

Change-Id: Ifca3bafcea1b8858baf4a22ddd264d5e07a0f1e5
2020-02-24 18:03:31 -08:00
Joshua Duong
1223bcaf0c Remove key from adb_keys if user forgets the key.
It was being removed from adb_temp_keys.xml but not adb_keys.

Bug: 150138676
Bug: 111434128

Test: atest AdbDebuggingManagerTest

Change-Id: I3c31394e4480e787c771e193b179a472d6ee4a62
2020-02-25 02:01:38 +00:00
TreeHugger Robot
bf2b4a3854 Merge "Fix PinnerService SecurityException at boot" into rvc-dev 2020-02-25 01:44:36 +00:00
Santhosh Thangaraj
b403e7d24f Fix the delay time for Assistant
Bug: 150144102
Test: no new test added Existing is sufficient NotificationManagerServiceTest

Change-Id: Iaa3559b20e69ef57a4a4ddd6665d4d7156bb7dfe
2020-02-24 22:30:27 +00:00
Amy
630fc01bf6 Fix issues in register/unregister client API implementation
Issues include:
1. clientId array size checking too hard
2. missed use case validation
3. missed in use resources update when unregistering client(same in on
binder dead, will be in separate CL)
4. Calling PID should have only be used when tvinputsession id is null
5. Adding resources list to client profile

Test: atest TunerResourceManagerServiceTest
Bug: 147380513
Change-Id: I09b4105659a491b3c07e3b737fe0617b83d24447
(cherry picked from commit 19b71275e0)
2020-02-24 14:27:36 -08:00
Amy
abdf7b6a57 Add a TRM use case priority hints info object
This object includes a parser that reads the vendor config xml

Test: atest UseCasePriorityHintsTest
Bug: 147380513
Change-Id: I4bff0bc196a0c2a78ce4305acec7ce7cc9a4fa70
(cherry picked from commit 2f62bf64ca)
2020-02-24 14:27:36 -08:00
Amy
38ff0181c3 Add requestFrontend implementation in TunerResourceManager
Test: atest TunerResourceManagerServiceTest
Bug: 147380513
Change-Id: Icec048913e2cbe141448c0c322d37c233588dfcd
(cherry picked from commit 9d150f58bd)
2020-02-24 14:27:36 -08:00
Amy
9796ba2f6d Implement TRM setFrontendInfoList logic with unit tests
Note that this CL includes some format changes and redundant
implementation removing in ClientProfile.java and
TunerResourceManagerService.java.

The key change of the CL is the FrontendResource.java object and
the impl of the setFrontendResourceList method in
TunerResourceManagerService.java.

Test: atest TunerResourceManagerServiceTest
Bug: 147380513
Change-Id: I3df8e386ad37bc67694594b07de04cc9f3b88e02
(cherry picked from commit caf201a8e7)
2020-02-24 14:27:36 -08:00
Makoto Onuki
2d80ca09fc Squash same ApplicationInfo's in Parcel
ApplicationInfo now automatically tries to "squash" the same instances in a
Parcel.

NOTE: This CL still does *not* optimize the package manager APIs that return a
list. e.g. PM.queryContentProviders() still return duplicate AppInfo's.
We can optimize them by making ParcelableListSlice call "allowSquashing",
but that *could* have negative side effects, so I'm not doing it in this CL.
I think we can do that for S.

Bug: 148588589
Test: atest CtsContentTestCases # except for two preexsiting failures:
- android.content.pm.cts.PackageManagerTest#testGetIcon
- android.content.pm.cts.PackageManagerTest#testGetPreferredActivities

Test: Use the debugger and make sure bindApplication() is not receiving
duplicate AppInfo's in the provider list.

Change-Id: I3ba2c047a469169340c0f75c36bdfd394bc5d627
(cherry picked from commit 7d09275d70)
2020-02-24 22:22:13 +00:00
Feng Cao
85cbe43d48 Merge "Use context for correct display in the renderer service" into rvc-dev 2020-02-24 22:10:06 +00:00
Hongwei Wang
85cf41fcc3 Move PiP animation to SysUI package
The bounds animation is cleaned up within window manager and it's now
the SysUI component listening on callbacks from TaskOrganizer for
entering to and exiting from PiP mode.

Additionally, the expand and move of the PiP window is now part of SysUI
as well.

Known issues:
- Black background when in transition from PiP to fullscreen. The
wallpaper gets into hidden state too early
- App gets into PiP mode too early when entering PiP, need to defer the
configuration change sent to app in this case

Bug: 146594635
Bug: 148198539
Bug: 138144750
Bug: 149569903
Test: atest PinnedStackTests
Test: atest PipAnimationControllerTest
Test: atest RecentsAnimationTest
Test: atest RecentTasksTest
Test: atest com.android.server.wm.ActivityStarterTests
Merged-In: Id0c8ce03fa26952daf5e3687b18b2eb2375b7d20
Change-Id: Id0c8ce03fa26952daf5e3687b18b2eb2375b7d20
2020-02-24 21:16:20 +00:00
Peter Kalauskas
84f02a81e8 Disable reduced scale if reduced scale config is 0
Change reduced scale implementation to toggle on/off based on
config_lowResTaskSnapshotScale=0 instead of ro.config.low_ram=true

Also, only use _reduced.jpg if reduced scale is enabled.  Previously,
for task snapshots, [0-9]+_reduced.jpg would be used if reduced scale
was disabled, and [0-9]+.jpg would never be used. This patch swaps that
behavior to make the underlying system more intuitive.  Now, if reduced
snapshots are disabled, store the task snapshot in [0-9]+.jpg and never
use [0-9]+_reduced.jpg.

Also, store low-res snapshots at config_lowResTaskSnapshotScale.
Prevously, low-res snapshots were stored at lowResScale * highResScale

Test: TaskSnapshotCacheTest
Test: TaskSnapshotControllerTest
Test: TaskSnapshotPersisterLoaderTest
Test: TaskSnapshotSurfaceTest
Bug: 148099851
Bug: 142063079
Change-Id: I5a0d58766347d875eaec138820323063aa1c2988
2020-02-24 21:02:03 +00:00