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

Commit 2a1cedf2 authored by Darrell Shi's avatar Darrell Shi Committed by Android (Google) Code Review
Browse files

Merge "Override edit mode activity launch animation" into main

parents 4057412a d6cd06fb
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -73,6 +73,7 @@ class EditWidgetsActivityStarterTest : SysuiTestCase() {
                        eq(true),
                        eq(true),
                        any(),
                        any(),
                        captor.capture(),
                    )

@@ -92,19 +93,19 @@ class EditWidgetsActivityStarterTest : SysuiTestCase() {
            testScope.runTest {
                underTest.startActivity(shouldOpenWidgetPickerOnStart = true)
                verify(activityStarter)
                    .startActivityDismissingKeyguard(any(), eq(true), eq(true), any(), any())
                    .startActivityDismissingKeyguard(any(), eq(true), eq(true), any(), any(), any())

                clearInvocations(activityStarter)

                underTest.startActivity(shouldOpenWidgetPickerOnStart = false)
                verify(activityStarter, never())
                    .startActivityDismissingKeyguard(any(), eq(true), eq(true), any(), any())
                    .startActivityDismissingKeyguard(any(), eq(true), eq(true), any(), any(), any())

                communalSceneInteractor.setEditModeState(null)

                underTest.startActivity(shouldOpenWidgetPickerOnStart = true)
                verify(activityStarter)
                    .startActivityDismissingKeyguard(any(), eq(true), eq(true), any(), any())
                    .startActivityDismissingKeyguard(any(), eq(true), eq(true), any(), any(), any())
            }
        }
    }
@@ -123,6 +124,7 @@ class EditWidgetsActivityStarterTest : SysuiTestCase() {
                        eq(true),
                        any(),
                        any(),
                        any(),
                    )
                assertThat(captor.lastValue.component).isEqualTo(component)
                assertThat(captor.lastValue.flags and Intent.FLAG_ACTIVITY_NEW_TASK).isNotEqualTo(0)
@@ -147,6 +149,7 @@ class EditWidgetsActivityStarterTest : SysuiTestCase() {
                        eq(true),
                        any(),
                        any(),
                        any(),
                    )
                assertThat(captor.lastValue.component).isEqualTo(component)
                assertThat(captor.lastValue.flags and Intent.FLAG_ACTIVITY_NEW_TASK).isNotEqualTo(0)
+9 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
package com.android.systemui.plugins;

import android.annotation.Nullable;
import android.app.ActivityOptions;
import android.app.PendingIntent;
import android.content.ComponentName;
import android.content.Intent;
@@ -184,6 +185,14 @@ public interface ActivityStarter {
            @Nullable String customMessage,
            Callback callback);

    /** Starts an activity with custom ActivityOptions and dismisses keyguard. */
    void startActivityDismissingKeyguard(Intent intent,
            boolean onlyProvisioned,
            boolean dismissShade,
            @Nullable String customMessage,
            ActivityOptions activityOptions,
            Callback callback);

    /** Starts an activity and dismisses keyguard. */
    void startActivityDismissingKeyguard(Intent intent,
            boolean onlyProvisioned,
+24 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>

<!--
  ~ Copyright (C) 2025 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<alpha
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:duration="1000"
    android:fromAlpha="0.0"
    android:toAlpha="1.0"
/>
+24 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>

<!--
  ~ Copyright (C) 2025 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<alpha
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:duration="1000"
    android:fromAlpha="1.0"
    android:toAlpha="0.0"
/>
+2 −1
Original line number Diff line number Diff line
@@ -1162,7 +1162,8 @@

    <style name="Theme.EditWidgetsActivity"
        parent="@android:style/Theme.DeviceDefault.NoActionBar.Fullscreen">
        <item name="android:windowBackground">@android:color/white</item>
        <item name="android:windowIsTranslucent">true</item>
        <item name="android:windowBackground">@android:color/transparent</item>
    </style>

    <style name="TextAppearance.Control">
Loading