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

Commit 38903174 authored by Bruno Martins's avatar Bruno Martins
Browse files

Merge tag 'android-14.0.0_r55' into staging/lineage-21.0_merge-android-14.0.0_r55

Android 14.0.0 Release 55 (AP2A.240805.005)

# -----BEGIN PGP SIGNATURE-----
#
# iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCZrKMGgAKCRDorT+BmrEO
# eB9vAJ9t930xd12Tf8UYmocnjPX5n9GiYACfZS+cLGA0vQSzeur/uzXxiBMyLSc=
# =2/yk
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Aug  6 21:48:26 2024 WEST
# gpg:                using DSA key 4340D13570EF945E83810964E8AD3F819AB10E78
# gpg: Can't check signature: No public key

# By Faye Yan (4) and others
# Via Android Build Coastguard Worker
* tag 'android-14.0.0_r55': (21 commits)
  Move showing keyguard after the UserSwitchObservers.
  Move showing keyguard after the UserSwitchObservers.
  Revert "Move showing keyguard after the UserSwitchObservers."
  Move showing keyguard after the UserSwitchObservers.
  Remove Dependency#get call from ToggleSeekBar.
  Enforce BaseUserRestriction for DISALLOW_CONFIG_BRIGHTNESS
  Remove Dependency#get call from ToggleSeekBar.
  Enforce BaseUserRestriction for DISALLOW_CONFIG_BRIGHTNESS
  Remove Dependency#get call from ToggleSeekBar.
  Enforce BaseUserRestriction for DISALLOW_CONFIG_BRIGHTNESS
  [RESTRICT AUTOMERGE] Messaging child requestLayout
  Revert "Security fix for VPN app killable via lockscreen."
  Revert "Security fix for VPN app killable via lockscreen."
  Security fix for VPN app killable via lockscreen.
  Security fix for VPN app killable via lockscreen.
  Ensure device_owners2.xml is always written.
  Add unit test to test data overflow when using BinaryXmlSerializer
  Restrict USB poups while setup is in progress
  Rate limiting PiP aspect ratio change request
  Fix READ/WRITE operation access issues on Restricted appOps.
  ...

Change-Id: Icab36e3432bf47973a1776a2420c3a90c45c6c46
parents b09bbae0 823e3198
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ class AppOpInfo {

    /**
     * This specifies whether each option is only allowed to be read
     * by apps with manage appops permission.
     * by apps with privileged appops permission.
     */
    public final boolean restrictRead;

+1 −1
Original line number Diff line number Diff line
@@ -3268,7 +3268,7 @@ public class AppOpsManager {
    }

    /**
     * Retrieve whether the op can be read by apps with manage appops permission.
     * Retrieve whether the op can be read by apps with privileged appops permission.
     * @hide
     */
    public static boolean opRestrictsRead(int op) {
+2 −0
Original line number Diff line number Diff line
@@ -92,6 +92,8 @@ public class MessagingLinearLayout extends ViewGroup {
            final View child = getChildAt(i);
            final LayoutParams lp = (LayoutParams) child.getLayoutParams();
            lp.hide = true;
            // Child always needs to be measured to calculate hide property correctly in onMeasure.
            child.requestLayout();
            if (child instanceof MessagingChild) {
                MessagingChild messagingChild = (MessagingChild) child;
                // Whenever we encounter the message first, it's always first in the layout
+50 −0
Original line number Diff line number Diff line
@@ -24,6 +24,8 @@ import static android.util.XmlTest.doVerifyRead;
import static android.util.XmlTest.doVerifyWrite;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.fail;
import static org.xmlpull.v1.XmlPullParser.START_TAG;

import android.os.PersistableBundle;
@@ -41,12 +43,15 @@ import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.nio.charset.StandardCharsets;

@RunWith(AndroidJUnit4.class)
public class BinaryXmlTest {
    private static final int MAX_UNSIGNED_SHORT = 65_535;

    /**
     * Verify that we can write and read large numbers of interned
     * {@link String} values.
@@ -170,4 +175,49 @@ public class BinaryXmlTest {
            }
        }
    }

    @Test
    public void testAttributeBytes_BinaryDataOverflow() throws Exception {
        final TypedXmlSerializer out = Xml.newBinarySerializer();
        final ByteArrayOutputStream os = new ByteArrayOutputStream();
        out.setOutput(os, StandardCharsets.UTF_8.name());

        final byte[] testBytes = new byte[MAX_UNSIGNED_SHORT + 1];
        assertThrows(IOException.class,
                () -> out.attributeBytesHex(/* namespace */ null, /* name */ "attributeBytesHex",
                        testBytes));

        assertThrows(IOException.class,
                () -> out.attributeBytesBase64(/* namespace */ null, /* name */
                        "attributeBytesBase64", testBytes));
    }

    @Test
    public void testAttributeBytesHex_MaximumBinaryData() throws Exception {
        final TypedXmlSerializer out = Xml.newBinarySerializer();
        final ByteArrayOutputStream os = new ByteArrayOutputStream();
        out.setOutput(os, StandardCharsets.UTF_8.name());

        final byte[] testBytes = new byte[MAX_UNSIGNED_SHORT];
        try {
            out.attributeBytesHex(/* namespace */ null, /* name */ "attributeBytesHex", testBytes);
        } catch (Exception e) {
            fail("testAttributeBytesHex fails with exception: " + e.toString());
        }
    }

    @Test
    public void testAttributeBytesBase64_MaximumBinaryData() throws Exception {
        final TypedXmlSerializer out = Xml.newBinarySerializer();
        final ByteArrayOutputStream os = new ByteArrayOutputStream();
        out.setOutput(os, StandardCharsets.UTF_8.name());

        final byte[] testBytes = new byte[MAX_UNSIGNED_SHORT];
        try {
            out.attributeBytesBase64(/* namespace */ null, /* name */ "attributeBytesBase64",
                    testBytes);
        } catch (Exception e) {
            fail("testAttributeBytesBase64 fails with exception: " + e.toString());
        }
    }
}
+12 −1
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import com.android.systemui.common.shared.model.Icon
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
import com.android.systemui.globalactions.GlobalActionsDialogLite
import com.android.systemui.plugins.ActivityStarter
import com.android.systemui.plugins.FalsingManager
import com.android.systemui.qs.dagger.QSFlagsModule.PM_LITE_ENABLED
import com.android.systemui.qs.footer.data.model.UserSwitcherStatusModel
@@ -109,6 +110,7 @@ class FooterActionsViewModel(
        private val falsingManager: FalsingManager,
        private val footerActionsInteractor: FooterActionsInteractor,
        private val globalActionsDialogLiteProvider: Provider<GlobalActionsDialogLite>,
        private val activityStarter: ActivityStarter,
        @Named(PM_LITE_ENABLED) private val showPowerButton: Boolean,
    ) {
        /** Create a [FooterActionsViewModel] bound to the lifecycle of [lifecycleOwner]. */
@@ -134,6 +136,7 @@ class FooterActionsViewModel(
                footerActionsInteractor,
                falsingManager,
                globalActionsDialogLite,
                activityStarter,
                showPowerButton,
            )
        }
@@ -145,6 +148,7 @@ fun FooterActionsViewModel(
    footerActionsInteractor: FooterActionsInteractor,
    falsingManager: FalsingManager,
    globalActionsDialogLite: GlobalActionsDialogLite,
    activityStarter: ActivityStarter,
    showPowerButton: Boolean,
): FooterActionsViewModel {
    suspend fun observeDeviceMonitoringDialogRequests(quickSettingsContext: Context) {
@@ -169,7 +173,14 @@ fun FooterActionsViewModel(
            return
        }

        activityStarter.dismissKeyguardThenExecute(
            {
                footerActionsInteractor.showForegroundServicesDialog(expandable)
                false /* if the dismiss should be deferred */
            },
            null /* cancelAction */,
            true /* afterKeyguardGone */
        )
    }

    fun onUserSwitcherClicked(expandable: Expandable) {
Loading