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

Unverified Commit 04692263 authored by Sean McCreary's avatar Sean McCreary Committed by Michael Bestas
Browse files

Trebuchet: Add resource for home screen rotation default

Restore the resource that was removed in Android 12 to
permit use of a device-specific overlay to change the
default behavior.

Change-Id: Ifee6a6ff6ae6fc67160931de4bffcba630081d6d
parent e016d588
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ import androidx.annotation.NonNull;

import com.android.launcher3.DeviceProfile;
import com.android.launcher3.InvariantDeviceProfile;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.testing.TestProtocol;
import com.android.launcher3.touch.PagedOrientationHandler;
@@ -291,7 +292,8 @@ public class RecentsOrientedState implements
    }

    private void updateHomeRotationSetting() {
        boolean homeRotationEnabled = mSharedPrefs.getBoolean(ALLOW_ROTATION_PREFERENCE_KEY, false);
        boolean homeRotationEnabled = mSharedPrefs.getBoolean(ALLOW_ROTATION_PREFERENCE_KEY,
                mContext.getResources().getBoolean(R.bool.allow_rotation));
        setFlag(FLAG_HOME_ROTATION_ALLOWED_IN_PREFS, homeRotationEnabled);
        SystemUiProxy.INSTANCE.get(mContext).setHomeRotationEnabled(homeRotationEnabled);
    }
+1 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
<resources>
    <!-- Miscellaneous -->
    <bool name="config_largeHeap">false</bool>
    <bool name="allow_rotation">false</bool>

    <integer name="extracted_color_gradient_alpha">153</integer>

+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@
        android:key="pref_allowRotation"
        android:title="@string/allow_rotation_title"
        android:summary="@string/allow_rotation_desc"
        android:defaultValue="false"
        android:defaultValue="@bool/allow_rotation"
        android:persistent="true"
        launcher:logIdOn="615"
        launcher:logIdOff="616" />