Also fixed how the logout user was cleared after a successful switch.
They will be used by CarSystemUi to end a session.
Test: Manual verification with CtsVerifier and TestDpc on automotive
Bug: 205185521
Bug: 204483021
Change-Id: Ieda0a22625ef705fcd705aedfc2dbf2cf570bf81
It was requiring INTERACT_ACROSS_USERS_FULL (instead of
INTERACT_ACROSS_USERS), which cannot be granted by Shell
(and hence cannot be used by CtsVerifier).
Test: m update-api
Test: manual verification
Bug: 203752848
Change-Id: Ie84311e6500cefa055548e309ee6d629c62fb10d
A background app that changes the wallpaper, was able to change the
device theme.
This change will apply the theme if the app is on the foreground, like
WallpaperPicker would be, but would defer the event until the next power
button cycles, like we do with Live Wallpapers, to avoid the same type
of DoS.
Test: manual
Test: atest ThemeOverlayControllerTest
Fixes: 205140487
Change-Id: I2086b29ef9bf3bb6fb7d9ebba6e7b8db9392e459
Merged-In: I2086b29ef9bf3bb6fb7d9ebba6e7b8db9392e459
If a profile owner is defined for a specific user, do not delete usage
stats for a package on package deletion.
Bug: 197399948
Test: atest UserUsageStatsServiceTest
Test: atest UsageStatsTest [all]
Change-Id: I94a8e3dfca8ef4c7616f77944d61726e06043b85
Merged-In: I94a8e3dfca8ef4c7616f77944d61726e06043b85
Before this CL, SystemUiContexts were fixed to the Display metrics
when the SystemUiContexts were created. It is the same mechanism
as DisplayContext but applies to SystemUiContexts unexpectedly.
This CL makes SystemUiContexts associate with DisplayContent with
the corresponding display ID. In this way, SystemUiContext would
receive updates when there is a Display property change.
Bug: 194262507
Bug: 191064581
Test: atest InputMethodMenuControllerTest WindowContextControllerTest
Change-Id: Idd74da965c18bdbf8912bd45e89be21f652dcf93
setTurnScreenOn shouldn't dismiss keyguard automatically even when the
keyguard is insecure.
The keyguard state should only be affected by requestDismissKeyguard
and/or setShowWhenLocked, and for either case setTurnScreenOn can be
used to wakeup device if the activity is going to be resumed and
visible.
Bug: 201103497
Test: atest ActivityVisibilityTests KeyguardTests KeyguardLockedTests
Change-Id: I283dea469a33286fc9cf835e39ee5a3be2444739
(cherry picked from commit f3a1274a38)
On "traditional" devices, this method switches back to the "primary"
user, which is the system user. But on devices running with headless
system user mode, it should switch to the previous user instead.
Test: manual verification (TestDpc/CtsVerifier) on car and phone
Test: atest com.android.cts.devicepolicy.DeviceOwnerTest#testCreateAndManageUser_LogoutUser
Bug: 204483021
Change-Id: I3ccbc1f31f8bcc4dae8fcb71cf5de7a7ad8882fe
This ensures that a locusId change will trigger an
onTaskInfoChange immediately. Previously it would just
be sent with the next info change event which isn't
sufficient.
Test: atest NotificationManagerTest
Bug: 204260661
Change-Id: I2b53f63b6efd6d2c22a877b7c33f5a12832a8e1d
The APIs are deprecated (in favor of setRequiredPasswordComplexity())
and some automotive OEMs might not even provide the option to
set passwords (just PINs and patterns).
Fixes: 204252236
Test: atest CtsDevicePolicyTestCases:android.devicepolicy.cts.DeprecatedPasswordAPIsTest # on automotive and phone
Change-Id: I6272bdd0e893f6fd8f1d126d384d1b332e61bac2
This will allow us to point other directories at these files for OWNERS
and make it easier to update after future team changes.
Test: N/A
Bug: 202714830
Change-Id: Iaaf5b8eb7568be4ebfd1b30abae0b757153f0391
(cherry picked from commit 7443751dd9)
The root cause of this issue is that we pass mClassLoader to new created
Resources, but it may be null if we don't set ClassLoader from
container.
This CL fixes this issue by use ContextImpl#getClassLoader instead.
Bug: 203027987
Test: reproducible steps mentioned in bug
Change-Id: Ic88a351b3e9bbcf8382b9aefea63e2be2f190cb6
The check has to be done in RemoteViews and in AppWidgetHostView right
before creating the context used to inflate the app widget. Further, the
APK is cached potentially in two places: in the APK with code and the
APK without codes, so both places are updated if present.
Test: manual, see bug for details
Fix: 202369942
Change-Id: I5718f67711a3332a942d3c037eef7f30379549a4
This is needed for digital wellbeing, see go/dwb-dialog-multi-window-dd for more information.
Bug: 199825187
Test: N/A
Change-Id: Ic0acbb034f326d0e8bc0e63d8c1a7b3f35a0e931
Renames the shouldUseDefaultDeviceStateChangeTransition attribute name to
shouldUseDefaultUnfoldTransition to make it less generic.
Test: manual
Fixes: 200730817
Change-Id: Icc7f25f20758162c318e0b0896fb9a7bb2de5911
Use applyTransactionOnDraw to ensure all transaction happen
during the same frame, including
- hide the starting window.
- reparent the remote SurfaceView to client.
Bug: 198593932
Test: continues launch test app several times then verify with winscope
to ensure there is no flicker anymore.
Merged-In: I03c600afdc477ca0c8064b215f2b361468db9f3c
Change-Id: I03c600afdc477ca0c8064b215f2b361468db9f3c
setTurnScreenOn shouldn't dismiss keyguard automatically even when the
keyguard is insecure.
The keyguard state should only be affected by requestDismissKeyguard
and/or setShowWhenLocked, and for either case setTurnScreenOn can be
used to wakeup device if the activity is going to be resumed and
visible.
Bug: 201103497
Test: atest ActivityVisibilityTests KeyguardTests KeyguardLockedTests
Change-Id: I283dea469a33286fc9cf835e39ee5a3be2444739
onActivityResult was called before onStart when resuming an activity
from STOPPED state.
Ensure the onActivityResult callback to be called before onResume.
But we only fix this after Android S to avoid some app compatibility
issues.
Bug: 78294732
Bug: 130178098
Test: atest ActivityLifecycleTests
Change-Id: I9ff060ff26d3fc517aae0a094fc041887326a963
Renames the shouldUseDefaultDeviceStateChangeTransition attribute name to
shouldUseDefaultDisplayStateChangeTransition to make it less generic.
Test: manual
Fixes: 200698833
Change-Id: Ib6f90bcba2e75485e954bdbc1833fd67728e51c6
It will be used by the test infra to just set the device owner,
without setting the profile owner on current user on systems
using headless system user.
Test: atest com.android.cts.devicepolicy.DeviceOwnerTest#testDeviceOwnerSetup
Test: adb shell dpm set-device-owner --user 0 --device-owner-only com.afwsamples.testdpc/.DeviceAdminReceiver
Test: m update-api
Fixes: 201313785
Bug: 192395248
Change-Id: I41c2cf187c1eceebe7c6ef30f9cff693b9dcbc15
The token was needed because the TaskFragment info may not
sent to the organizer before activity created.
The token is no longer necessary because the TaskFragment
info is now ensured to be updated before activity created.
Bug: 200303250
Test: wm presubmit
Change-Id: I69a42fa35efde4fc7f37ab50334de5de146da90d