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

Commit d2ff4ead authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 12370552 from 31eb3031 to 24Q4-release

Change-Id: I54cafb8bf11de89d55f59244ae74f8dd5737874e
parents 44a417ac 31eb3031
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -593,6 +593,11 @@ public final class SystemServiceRegistry {
            @Override
            public TextServicesManager createService(ContextImpl ctx)
                    throws ServiceNotFoundException {
                 if (ctx.getPackageManager().hasSystemFeature(PackageManager.FEATURE_WATCH)
                        && ServiceManager.getService(Context.TEXT_SERVICES_MANAGER_SERVICE) == null
                        && android.server.Flags.removeTextService()) {
                    return null;
                }
                return TextServicesManager.createInstance(ctx);
            }});

@@ -1887,6 +1892,12 @@ public final class SystemServiceRegistry {
                        return null;
                    }
                    break;
                case Context.TEXT_SERVICES_MANAGER_SERVICE:
                    if (android.server.Flags.removeTextService()
                            && hasSystemFeatureOpportunistic(ctx, PackageManager.FEATURE_WATCH)) {
                        return null;
                    }
                    break;
            }
            Slog.wtf(TAG, "Manager wrapper not available: " + name);
            return null;
+1 −0
Original line number Diff line number Diff line
@@ -205,6 +205,7 @@ package android.nfc.cardemulation {
    method public int getSelectionModeForCategory(String);
    method public boolean isDefaultServiceForAid(android.content.ComponentName, String);
    method public boolean isDefaultServiceForCategory(android.content.ComponentName, String);
    method @FlaggedApi("android.nfc.enable_card_emulation_euicc") public boolean isEuiccSupported();
    method public boolean registerAidsForService(android.content.ComponentName, String, java.util.List<java.lang.String>);
    method @FlaggedApi("android.nfc.nfc_read_polling_loop") public boolean registerPollingLoopFilterForService(@NonNull android.content.ComponentName, @NonNull String, boolean);
    method @FlaggedApi("android.nfc.nfc_read_polling_loop") public boolean registerPollingLoopPatternFilterForService(@NonNull android.content.ComponentName, @NonNull String, boolean);
+0 −1
Original line number Diff line number Diff line
@@ -98,7 +98,6 @@ package android.nfc.cardemulation {
  public final class CardEmulation {
    method @FlaggedApi("android.permission.flags.wallet_role_enabled") @Nullable @RequiresPermission(android.Manifest.permission.NFC_PREFERRED_PAYMENT_INFO) public static android.content.ComponentName getPreferredPaymentService(@NonNull android.content.Context);
    method @FlaggedApi("android.nfc.enable_nfc_mainline") @NonNull public java.util.List<android.nfc.cardemulation.ApduServiceInfo> getServices(@NonNull String, int);
    method @FlaggedApi("android.nfc.enable_card_emulation_euicc") public boolean isEuiccSupported();
    method @FlaggedApi("android.nfc.nfc_override_recover_routing_table") public void overrideRoutingTable(@NonNull android.app.Activity, int, int);
    method @FlaggedApi("android.nfc.nfc_override_recover_routing_table") public void recoverRoutingTable(@NonNull android.app.Activity);
  }
+0 −2
Original line number Diff line number Diff line
@@ -992,9 +992,7 @@ public final class CardEmulation {
     * Is EUICC supported as a Secure Element EE which supports off host card emulation.
     *
     * @return true if the device supports EUICC for off host card emulation, false otherwise.
     * @hide
     */
    @SystemApi
    @FlaggedApi(android.nfc.Flags.FLAG_ENABLE_CARD_EMULATION_EUICC)
    public boolean isEuiccSupported() {
        return callServiceReturn(() -> sService.isEuiccSupported(), false);
+42 −0
Original line number Diff line number Diff line
@@ -21,13 +21,17 @@ import android.platform.test.annotations.EnableFlags
import android.testing.TestableLooper
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.compose.animation.scene.Edge
import com.android.compose.animation.scene.Swipe
import com.android.compose.animation.scene.SwipeDirection
import com.android.compose.animation.scene.UserAction
import com.android.compose.animation.scene.UserActionResult
import com.android.systemui.SysuiTestCase
import com.android.systemui.coroutines.collectLastValue
import com.android.systemui.flags.EnableSceneContainer
import com.android.systemui.kosmos.testScope
import com.android.systemui.lifecycle.activateIn
import com.android.systemui.scene.shared.model.Scenes
import com.android.systemui.scene.shared.model.TransitionKeys.ToSplitShade
import com.android.systemui.shade.data.repository.shadeRepository
import com.android.systemui.shade.domain.interactor.shadeInteractor
@@ -92,4 +96,42 @@ class GoneUserActionsViewModelTest : SysuiTestCase() {

            assertThat(userActions?.get(Swipe(SwipeDirection.Down))?.transitionKey).isNull()
        }

    @Test
    @DisableFlags(DualShade.FLAG_NAME)
    fun swipeDownWithTwoFingers_singleShade_goesToQuickSettings() =
        testScope.runTest {
            val userActions by collectLastValue(underTest.actions)
            shadeRepository.setShadeLayoutWide(false)
            runCurrent()

            assertThat(userActions?.get(swipeDownFromTopWithTwoFingers()))
                .isEqualTo(UserActionResult(Scenes.QuickSettings))
        }

    @Test
    @DisableFlags(DualShade.FLAG_NAME)
    fun swipeDownWithTwoFingers_splitShade_goesToShade() =
        testScope.runTest {
            val userActions by collectLastValue(underTest.actions)
            shadeRepository.setShadeLayoutWide(true)
            runCurrent()

            assertThat(userActions?.get(swipeDownFromTopWithTwoFingers()))
                .isEqualTo(UserActionResult(Scenes.Shade, ToSplitShade))
        }

    @Test
    @EnableFlags(DualShade.FLAG_NAME)
    fun swipeDownWithTwoFingers_dualShadeEnabled_isNull() =
        testScope.runTest {
            val userActions by collectLastValue(underTest.actions)
            runCurrent()

            assertThat(userActions?.get(swipeDownFromTopWithTwoFingers())).isNull()
        }

    private fun swipeDownFromTopWithTwoFingers(): UserAction {
        return Swipe(direction = SwipeDirection.Down, pointerCount = 2, fromSource = Edge.Top)
    }
}
Loading