Proxy is planned to move to the connectivity module, so framework
classes like DevicePolicyManager cannot depend on its private symbols.
Replace usage of ProxyInfo.validate by the equivalent isValid method on
ProxyInfo.
Bug: 174436414
Test: atest DevicePolicyManagerTest#testGetProxyParameters
Change-Id: I6da49a34c9893d07ef7cbee6a7386c9258839467
In preparation for a refactor of the logic, add a test to verify proxy
spec building and validation in DevicePolicyManager#setGlobalProxy.
Bug: 174436414
Test: atest DevicePolicyManagerTest#testGetProxyParameters
Merged-In: Ic1c8bf6e8f5e79a7a1736af6cc1d50a7969fb9ad
Change-Id: Ic1c8bf6e8f5e79a7a1736af6cc1d50a7969fb9ad
This is called from a GC handler hook in BinderInternal, from the
finalizer thread. It's a call from an app process into system_server. On
some devices, we observed this call taking a long time, causing
TimeoutExceptions on the finalizer thread.
Since this work is not critical, and when the GC runs is anyway
unpredictable, make releaseSomeActivities() oneway instead.
Bug: 118997212
Test: TH
Change-Id: I6b06917493a09a2fba63502c4bd1a203c184a62c
Merged-In: I6b06917493a09a2fba63502c4bd1a203c184a62c
Use ApplicationInfoAsUser() to get the application information by
user id to make sure we have correct permission, othewise we will
get the SecurityException due to lack of INTERACT_ACROSS_USERS.
Bug: 176313819
Test: atest CtsVoiceRecognitionTestCases
Test: manual.
1.create profile user
2.Install sample recognizer app
3.Function works fine and no security exception occurred after
apply the change
Change-Id: I6958dbf661373606fb9dba55e386aaea4399a146
Merged-In: Iaf485537b8082d2109d2134ff987dc7244e31218
Per request from a partner, these APIs will not be restricted as they
are in use. This is conceptually a partial revert of change 5d123b6775.
NoNonSdkCheck: b/170729553
Bug: 171933273
Test: Treehugger
Change-Id: Ibb525e9a9e2fc90248b74f45f3cdcb0be7487c3a
Currently, it will always look in user 0 since it uses the DPM from
mContext, which will always be from user 0 as WPMS is in the system
server process.
Extend DPMI to provide the necessary external helper API. This is
preferable to just using createContextAsUser before getting the DPM
instance since it avoids a second binding.
Fixes: 144048540
Fixes: 172682826
Bug: 153995973
Bug: 174642338
Test: atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testSetWallpaper_disallowed
Change-Id: I52b71000fac31ff6725ddded58206f69b263ae33
(cherry picked from commit 5b36ee3f1d)
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)
Add a path for GNSS time suggestions to get to the time detector.
Bug: 157265008
Test: atest services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorStrategyImplTest.java
Test: atest android.app.timedetector
Change-Id: I5cb12b5545652ed885b72a3170940050ce0628a6
Merged-In: I5cb12b5545652ed885b72a3170940050ce0628a6