Allow three types of the letterbox wallpaper:
- Solid background using color specified in R.color.config_letterboxBackgroundColorSolid color
- Color specified in R.attr.colorBackground for the letterboxed application
- Color specified in R.attr.colorBackgroundFloating for the letterboxed application
Also, adding ADB commands for each config value:
- adb shell cmd window set-letterbox-background-color [reset|color]
- adb shell cmd window get-letterbox-background-color
- adb shell cmd window set-letterbox-background-type [reset|solid_color|app_color_background|app_color_background_floating]
- adb shell cmd window get-letterbox-background-type
Test: manual with ADB commands, atest LetterboxTest
Fix: 179088234
Change-Id: I23cf0b52c9f95d1f92255731bc7be165a575c7cd
Add interface for SizeCompatUIController in WM shell to use
when refactoring SizeCompatModeActivityController from system UI.
Bug: 176061101
Bug: 178327644
Test: atest WMShellUnitTests:ShellTaskOrganizerTests
Change-Id: I37f72396e1769b7773722be6575506fc430b2739
Similar to passing in display metrics. We can use
ActivityThread.currentApplication() as the context for getting
PermissionManager in system server process because it will be created
early in ActivityThread.attach() before any custom logic can run, but
it becomes a problem for apps because they can run their own logic by
overriding Application.attachBaseContext() and do things there before
ActivityThread.currentApplication() becomes non-null.
So pass in the split permissions explicitly as an external dependency
for ParsingPackageUtils, and move the getPackageArchiveInfo()
implementation from PackageManager to ApplicationPackageManager to
utilize the context there. PackageParser2 can get the split
permissions internally because it's only used in system server.
Fixes: 178155985
Test: manual
Change-Id: I8213cf752e16b08328ad1150b2639da18c5d0e83
(cherry picked from commit 7b8974d375)
Since the Permission Controller calls into DPM, to avoid a potential
circular dependency (where the DPMS holds a lock while the Permission
Controller calls it), cache the permission policy.
Bug: 158735247
Test: atest com.android.cts.devicepolicy.MixedProfileOwnerTest#testDelegation com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDelegation com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testDelegation
Test: atest com.android.cts.devicepolicy.MixedProfileOwnerTest#testPermissionAppUpdate com.android.cts.devicepolicy.MixedProfileOwnerTest#testPermissionPolicy com.android.cts.devicepolicy.MixedDeviceOwnerTest#testPermissionAppUpdate com.android.cts.devicepolicy.MixedDeviceOwnerTest#testPermissionPolicy com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testPermissionAppUpdate com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testPermissionPolicy
Change-Id: I6cfc027b063f43053d1ff4cc42d37935491064ff
This patch also removes the functionality of returning
original subscriberId in eng build since it is not really useful.
Test: atest NetworkIdentityUtilsTest
Bug: 174123988
Change-Id: I721457e571aa9403a2200b3e4261b4895e4f7a3e
Otherwise the calling activity is not blocked and can proceed
to change activity state, that may cause the override request
to be dropped. In addition, it is usually called after
startActivity and finish which are non-one-way binder calls.
The order also needs to be guaranteed to make the override
take effect.
Bug: 161781274
Bug: 179008865
Test: WindowUntrustedTouchTest# \
testWhenExitAnimationAboveThresholdFromSameUid_allowsTouch
Change-Id: I7ca018a934972c195040f2a9f63a18a59dce9c48
and getting resources for a particular config
This would allow fetching display infos for the activity in a particular
config independent of system config.
Bug: 156154533
Test: Included CTS
Change-Id: Ie245d685fb21444c10a88b4ca86dc7ff08e2b599
Merged-In: Ie245d685fb21444c10a88b4ca86dc7ff08e2b599
As connectivity services are planned to move to a separate module, move
the manager classes registration from SystemServiceRegistry to
ConnectivityServicesRegistrar, using the registerContextAwareService
APIs.
This follows patterns and naming in WifiFrameworkInitializer.
Bug: 171540887
Test: device boots, connectivity working
Change-Id: I62ced1275750c73f209bac8ec3a3204b95695b83
Trigger TaskInfoChanged when the direct top Activity of the organized
Task enters or exits size compat mode.
This is the prerequisite to move SizeCompatModeActivityController from
system ui to shell. After that, we can render the size compat restart
button on Task Surface similar to split screen divider.
Bug: 176061101
Bug: 178327644
Test: atest WmTests:SizeCompatTests
Test: atest WmTests:WindowOrganizerTests
Change-Id: I0e328796095bc17d40a5ef2f354f291c12ffa04a
GameManager service is a service to manage game related features. This
patch creates the initial service to manage the game mode and persist
the data across reboot.
Bug: b/174956354
Test: atest GameManagerTests
Test: atest GameManagerServiceTests
Test: atest GameManagerServiceSettingsTests
Change-Id: Iee2ab47c79d29f48847bc6d4b3eb781a5af18ff4
Avoid over-querying data by returning a single ConversationChannel when
requested by shortcut ID.
Test: DataManagerTest
Bug: 178792356
Change-Id: I181682b70022d1ce0b055ce1e7c97f5b84c6f1f0
(cherry picked from commit d546f62063)
The intention of previous one-way change is to reduce blocking
call on client side. But in most of cases the blocking of
activityPaused is no harm for the app. Because either the app
is going to background or it launches another activity in the
same process. If the case is the latter, the creation of next
activity is still scheduled after activityPaused is done.
Some apps may even use Idler to start some post initialization.
They assume the timing of idle will happen after the whole
consecutive launch in the same process. Then the non-blocking
call may break their assumption that the idle event is triggered
earlier.
Bug: 161781274
Bug: 178005687
Test: CtsWindowManagerDeviceTestCases
Test: In the onCreate of first activity, start the second activity
and set an Idler on UI thread. The Idler should be called
after the second activity is launched.
Change-Id: Ib256d0a534fedb0b39f2825f4deb2f8c81e857be