Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca302d49 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Merge "Add screenSize and smallestScreenSize to manifest" into...

Merge "Merge "Add screenSize and smallestScreenSize to manifest" into tm-qpr-dev am: 66338519 am: c70bbdf0" into udc-dev am: 618d0c65 am: d01f6911

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22198744



Change-Id: I06a30b23841b1e0cbaedb3333ac262ecd797ea2c
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents ab3f5496 d01f6911
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -932,7 +932,7 @@
                  android:showForAllUsers="true"
                  android:finishOnTaskLaunch="true"
                  android:launchMode="singleInstance"
                  android:configChanges="screenLayout|keyboard|keyboardHidden|orientation"
                  android:configChanges="screenSize|smallestScreenSize|screenLayout|keyboard|keyboardHidden|orientation"
                  android:visibleToInstantApps="true">
        </activity>

+7 −3
Original line number Diff line number Diff line
@@ -47,7 +47,8 @@ import javax.inject.Inject
 * destroyed on SCREEN_OFF events, due to issues with occluded activities over lockscreen as well as
 * user expectations for the activity to not continue running.
 */
class ControlsActivity @Inject constructor(
// Open for testing
open class ControlsActivity @Inject constructor(
    private val uiController: ControlsUiController,
    private val broadcastDispatcher: BroadcastDispatcher,
    private val dreamManager: IDreamManager,
@@ -98,8 +99,11 @@ class ControlsActivity @Inject constructor(

    override fun onConfigurationChanged(newConfig: Configuration) {
        super.onConfigurationChanged(newConfig)
        if (lastConfiguration.diff(newConfig) and ActivityInfo.CONFIG_ORIENTATION != 0 ) {
            uiController.onOrientationChange()
        val interestingFlags = ActivityInfo.CONFIG_ORIENTATION or
                ActivityInfo.CONFIG_SCREEN_SIZE or
                ActivityInfo.CONFIG_SMALLEST_SCREEN_SIZE
        if (lastConfiguration.diff(newConfig) and interestingFlags != 0 ) {
            uiController.onSizeChange()
        }
        lastConfiguration = newConfig
    }
+1 −1
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ interface ControlsUiController {
     */
    fun getPreferredSelectedItem(structures: List<StructureInfo>): SelectedItem

    fun onOrientationChange()
    fun onSizeChange()
}

sealed class SelectedItem {
+1 −1
Original line number Diff line number Diff line
@@ -809,7 +809,7 @@ class ControlsUiControllerImpl @Inject constructor (
        }
    }

    override fun onOrientationChange() {
    override fun onSizeChange() {
        selectionItem?.let {
            when (selectedItem) {
                is SelectedItem.StructureItem -> createListView(it)
+5 −0
Original line number Diff line number Diff line
@@ -108,6 +108,11 @@
            android:excludeFromRecents="true"
            />

        <activity android:name="com.android.systemui.controls.ui.TestableControlsActivity"
            android:exported="false"
            android:excludeFromRecents="true"
            />

        <activity android:name="com.android.systemui.screenshot.ScrollViewActivity"
                  android:exported="false" />

Loading