Commit Graph

497194 Commits

Author SHA1 Message Date
Kyunglyul Hyun
56bc779553 MediaRouterService binds services when necessary
MediaRouterService maintained bindings to provider services
once those are established.

With this CL, it only binds services when there is a non-empty
discovery preference set by a foreground app or an app is casting.

This change may break output switcher, which enables transfer media
of background apps.

To alleviate that MediaRouter2Manager#startScan and #stopScan are added
so that system UI can force the service bind to the services and find
remote devices to cast.

Bug: 169575701
Bug: 172920557

Test: manually and CTS
Change-Id: I4a47fdb1c9fe05a04d26950485833c9cbfb91a69
(cherry picked from commit 9f889ca4e6)
(cherry picked from commit 602b168f99)
2020-12-21 00:34:16 +00:00
Eric Laurent
6592972285 Merge "Add package name when initializing SoundPool." into rvc-qpr-dev 2020-12-18 12:21:19 +00:00
Ahaan Ugale
8b6f7f10f0 Merge "Don't change the voice interactor setting if it's explicitly unset." into rvc-qpr-dev 2020-12-18 07:20:42 +00:00
Steven Liu
8928131772 Merge "multiple users support for carrier wifi provisioning" into rvc-qpr-dev 2020-12-18 05:32:48 +00:00
TreeHugger Robot
771b2e70b2 Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-qpr-dev 2020-12-18 02:30:59 +00:00
TreeHugger Robot
616876cdfb Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-qpr-dev 2020-12-18 02:26:03 +00:00
TreeHugger Robot
a15331653e Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-qpr-dev 2020-12-18 02:13:01 +00:00
Alison Cichowlas
ac9d6f53da Merge "Fix sharing shortcuts not showing for Work Profile." into rvc-qpr-dev 2020-12-18 00:22:44 +00:00
Jordan Liu
5b48739837 Merge "DO NOT MERGE add android.permission.STATUS_BAR for cellbroadcastreceiver" into rvc-qpr-dev 2020-12-18 00:00:40 +00:00
TreeHugger Robot
b5a99ff8a1 Merge "DO NOT MERGE port power tap gesture logs to new standard" into rvc-qpr-dev 2020-12-17 22:47:04 +00:00
Chen Xu
af413b18d2 DO NOT MERGE add android.permission.STATUS_BAR for cellbroadcastreceiver
See b/171668171#29 for fix explanation.

Bug: 171668171
Bug: 172602964
Bug: 171614598
Bug: 171755310
Test: Manual test
Change-Id: Ie12354d42aa7d1bf07eeca1cb2c389d2383abbf4
2020-12-17 21:52:28 +00:00
Steven Liu
f60c7c6758 multiple users support for carrier wifi provisioning
Add a new intent to wake up carrier provisioning apps to handle
the refreshing request on user switching.

Bug: 156751190
Test: manual test, both SIM card changing and 'reset wifi' in multiple
users case.

Change-Id: I6591a4b5636c0464b4177af175d7cfdc5918010d
2020-12-17 13:43:04 -08:00
Bill Yi
db5d9e2644 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I3c23c1b588fd494ea728ed85e8a23828f17bcae8
2020-12-17 20:22:12 +00:00
Bill Yi
a8c76c1015 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ic2e6383a0424b14612b28bf8ad2fc9302b09f025
2020-12-17 19:14:02 +00:00
Chris Wren
dcccb262b2 DO NOT MERGE port power tap gesture logs to new standard
IGNORE_UI_EVENT_CHECKS=cherry-pick

Fixes: 169960245
Bug: 173605491
Test: atest GestureLauncherServiceTest
Change-Id: I300965af403449b07d3e58fabda81a9055821eb1
(cherry picked from commit 168651fda2)
2020-12-17 14:05:37 -05:00
Winson Chung
0b44441e7c Merge "Adding logging for the ML mBack gesture model." into rvc-qpr-dev 2020-12-17 18:11:06 +00:00
TreeHugger Robot
bc8d872805 Merge "DO NOT MERGE Correctly reset cross-profile app-op" into rvc-qpr-dev 2020-12-17 16:27:45 +00:00
TreeHugger Robot
bced8a0b49 Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-qpr-dev 2020-12-17 15:14:46 +00:00
TreeHugger Robot
3a763cd603 Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-qpr-dev 2020-12-17 14:58:16 +00:00
Bill Yi
09952ef7fd Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: Ie81aaa07515f8578c1481d375de20bef3f432f53
2020-12-17 14:45:00 +00:00
TreeHugger Robot
129fb5a990 Merge "Add mediametrics enum for MediaExtractor usage" into rvc-qpr-dev 2020-12-17 14:00:36 +00:00
TreeHugger Robot
84396160e4 Merge "Expose MediaExtractor entry point to MediaMetrics" into rvc-qpr-dev 2020-12-17 14:00:36 +00:00
jiabin
946d9f1d21 Add package name when initializing SoundPool.
The package name is useful for permission validation. Currently, package
name is required when starting external vibration so that the vibrator
service can verify if the app has the permission to start vibration.

Bug: 175595599
Test: SoundPool tests in cts
Test: play audio-coupled-haptic file using SoundPool.
Change-Id: Ibfe414063a303118a5bb393d65ea5dc2323bf722
Merged-In: Ibfe414063a303118a5bb393d65ea5dc2323bf722
(cherry picked from commit de9005bab1)
2020-12-17 13:46:17 +00:00
Alex Kershaw
f764d9e98f DO NOT MERGE Correctly reset cross-profile app-op
Delegate the resetting of the INTERACT_ACROSS_PROFILES app-op to
DevicePolicyManager, which knows whether it should be pre-granted and
knows to apply it equally across all users in the profile group.

Further unit tests for DevicePolicyManagerInternal will be added in
b/175440570 when we have the better infra for that.

The CrossProfileAppsServiceImpl changes look more complex than they are.
They consist of the following:
- Inclusive language changes to 'allowlist'
- Static imports of permissions to improve readability
- Previously, the setInteractAcrossProfilesAppOp method would set the
app-op for every user within the profile group of the 'calling user'.
However, given that we are now exposing this as a server-side internal
API where we need to pass in a user ID (from AppOpsService), we don't
necessarily have the guarantee that the 'calling user' is in the same
profile group. So we split it up: the client-side API and AIDL API still
set the app-op for the calling profile group, whereas the internal API
sets the app-op for every user within the profile group of the provided
user. The changes simply abstract away references to the 'calling user
ID'.

Fixes: 166561076
Bug: 175440570
Test: atest services/robotests/src/com/android/server/pm/CrossProfileAppsServiceImplRoboTest.java --verbose -c
Test: manual
Change-Id: I2181fe66022aaf6c3e6d784c0569d2f41ab66537
(cherry picked from commit d004f41188)
2020-12-17 13:27:34 +00:00
Santiago Seifert
94735d8ec4 Add mediametrics enum for MediaExtractor usage
Bug: 170386720
Test: Manually built the tree.
Change-Id: I953dd1891ef71dd9d5afbf8e154fdf0a3095d913
(cherry picked from commit bfe14daff8)
Merged-In: I953dd1891ef71dd9d5afbf8e154fdf0a3095d913
Merged-In: Id10861db464b88734c34c81db945b1a828f0bc2c
2020-12-17 12:37:42 +00:00
Sarah Chin
0d094ad38e Merge "Move phone ID to extra for action provision" into rvc-qpr-dev 2020-12-17 08:08:14 +00:00
Bill Yi
93cc97e755 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I8a2fa84a47917718b39195b63adc0b5a8bb8973a
2020-12-17 02:22:19 +00:00
TreeHugger Robot
0c73e5b4e9 Merge "Bluetooth: Check state correctly when client wants to bind" into rvc-qpr-dev 2020-12-17 01:47:52 +00:00
Maryam Karimzadehgan
04108ebb89 Adding logging for the ML mBack gesture model.
Test: manual on device
Bug:150170384
Change-Id: Id6e71b806db3e7cc8bf0b98321c561a5d2e8fbca
Merged-In: Id6e71b806db3e7cc8bf0b98321c561a5d2e8fbca
(cherry picked from commit 6f83f477b9)
2020-12-16 22:55:23 +00:00
Bill Yi
7bd07b24b3 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I189241262a8cd88d60bbb9008bb1366a1aebeedd
2020-12-16 22:24:42 +00:00
Xiangyu/Malcolm Chen
6403bb4cc2 Merge "Automatically dismiss SIM combination warnings and selection dialogs." into rvc-qpr-dev 2020-12-16 22:22:08 +00:00
Pinyao Ting
26bf81f9fe Removes undesirable invokation of checkUriPermission
Slice uses internal permission control, either the provider app can
specify a list of auto-grant permission, or the host app can request
user's consent on presenting slices from the provider app. In both cases
the invokation of checkUriPermission is non-neccessary.

Bug: 140727941
Test: atest SliceManagerServiceTest
Change-Id: Iac808eda08ac188185cd27f7ab8ce13accf7fce4
Merged-In: Iac808eda08ac188185cd27f7ab8ce13accf7fce4
(cherry picked from commit ab9a91fb69)
2020-12-16 19:25:05 +00:00
Ahaan Ugale
1c475a4b43 Don't change the voice interactor setting if it's explicitly unset.
Test: manual
Test: atest CtsAssistTestCases CtsVoiceInteractionTestCases CtsVoiceSettingsTestCases
Fix: 167261484

Change-Id: Ibc2c1675f8b026f2915c3faf55e8ff3c52e1ee32
Merged-In: Ibc2c1675f8b026f2915c3faf55e8ff3c52e1ee32
2020-12-16 17:01:42 +00:00
Zim
166d683ea4 Make low storage notification PendingIntent immutable
Malicious apps, especially NotificationListeners can hijack such
intents and grant themselves access to sensitive URIs by relying on
the OS URI granting mechanism. This change mitigates the security
issue and also adheres to the new enforcement requiring Android S+
targeting apps to explicitly specifiy a mutability flag.

Test: Manual
Bug: 153466381
Change-Id: If478386d68cf25c8f93c2685824700679e6b9ea9
(cherry picked from commit df9a44e1fb)
2020-12-16 15:02:25 +00:00
Riddle Hsu
5c2d5cda50 Merge "Clear fixed rotation if rotated recents activity becomes top" into rvc-qpr-dev 2020-12-16 05:36:06 +00:00
Hansong Zhang
373496657d Bluetooth: Check state correctly when client wants to bind
Use mState instead of mEnable to check Bluetooth server status.

mEnable is used to indicate whether the next action is enabling or
disabling the Bluetooth stack, whereas mState indicates the current
state.

Test: atest FrameworksServicesTests
Bug: 173941366
Change-Id: I335f1e33fe84a9dd7e9227dd55d54fcae7c0ec4b
2020-12-16 03:30:41 +00:00
Malcolm Chen
a4d48cdd20 Automatically dismiss SIM combination warnings and selection dialogs.
Bug: 142092510
Test: manual and unittest
Change-Id: I79468016814d23f2b77d5cf1e559b9a58e2949ab
Merged-In: I79468016814d23f2b77d5cf1e559b9a58e2949ab
2020-12-15 22:11:38 +00:00
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
Peiyong Lin
23ace73ac4 Merge "[GraphicsEnvironment] Avoid null access." into rvc-qpr-dev 2020-12-15 19:02:54 +00:00
TreeHugger Robot
29b5a3f06e Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-qpr-dev 2020-12-15 18:47:44 +00:00
TreeHugger Robot
a601f31dce Merge "Import translations. DO NOT MERGE ANYWHERE" into rvc-qpr-dev 2020-12-15 18:45:06 +00:00
Peiyong Lin
d22eebefdb [GraphicsEnvironment] Avoid null access.
Currently when debug layer apk is not installed, GraphicsEnvironment
logs the message and proceeds, which results in null pointer access
crash when later trying to access primaryAbi. Avoid null access by an
early return statement.

Bug: b/175699044
Test: specify not installed debug layer apk and no crash
Change-Id: I4f3b86b0a8cfff4fc608b3a59ebf0872db0465ff
Merged-In: I4f3b86b0a8cfff4fc608b3a59ebf0872db0465ff
(cherry picked from commit c5c17e66ba)
2020-12-15 17:54:45 +00:00
TreeHugger Robot
9622b6d7d0 Merge "Combine uids for CpuTimePerUidFreq atom" into rvc-qpr-dev 2020-12-15 17:48:53 +00:00
Riddle Hsu
a924b839d1 Clear fixed rotation if rotated recents activity becomes top
If recents animation is active, the transition is controlled by it.
There won't be a transition finish event after recents animation.
For example, if an activity finishes during swiping-up gesture,
the recents activity in rotated state won't be restored. So this
change checks whether recents become the top activity, then continue
the orientation update procedure to clear fixed rotation state and
let display orientation follow the current top.

Bug: 173143462
Test: atest RecentsAnimationControllerTest# \
            testClearFixedRotationLaunchingAppAfterCleanupAnimation
Change-Id: If82744bb846ac823c8fdd76bbf23b584b63776d4
(cherry picked from commit 498b87a347)
2020-12-15 15:46:35 +00:00
Santiago Seifert
ab813b4f12 Expose MediaExtractor entry point to MediaMetrics
Bug: 170386720
Test: atest CtsMediaV2TestCases:ExtractorTest$FunctionalityTest
Change-Id: Id10861db464b88734c34c81db945b1a828f0bc2c
Merged-In: Id10861db464b88734c34c81db945b1a828f0bc2c
2020-12-15 14:00:13 +00:00
Bill Yi
a5426a9956 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I423a4d73f93822247de7573b9f0a0a510ba95b33
2020-12-15 04:16:22 -08:00
Bill Yi
e642bf0d60 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I315dbf7277dcc5aa2c45186500c39c930ee7e1fa
2020-12-15 03:47:16 -08:00
Sarah Chin
4d810d4113 Move phone ID to extra for action provision
Previously, the phone ID was appended to the broadcast in DCT and sent
to ConnectivityManager. Instead of sending both as an action, send the
phone ID as an extra instead to make the action a protected broadcast.

Test: manually verify a SecurityException when action provision is sent
Test: atest DcTrackerTest
Bug: 172459128
Change-Id: Ic4129def86949d7191d15056852718dadbd72fba
Merged-In: Ic4129def86949d7191d15056852718dadbd72fba
2020-12-15 01:10:27 -08:00
Chen Xu
11ed014edf Merge "add permission check for exported activity" into rvc-qpr-dev 2020-12-15 03:10:56 +00:00
TreeHugger Robot
3317653b8c Merge "Send DROPBOX_ENTRY_ADDED to all users" into rvc-qpr-dev 2020-12-14 18:16:43 +00:00