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

Commit e6e7df0f authored by Vadim Caen's avatar Vadim Caen Committed by Automerger Merge Worker
Browse files

Merge changes from topics "splash_api_sc_a2", "splash_api_sc_a3",...

Merge changes from topics "splash_api_sc_a2", "splash_api_sc_a3", "splash_api_sc_a4", "splash_api_sc_a5", "splash_api_sc_a6", "splash_exit_sc_a1" into sc-dev am: 24764efd

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia86b428249781575f3530b45dc065e120e1c07af
parents fca25ea6 24764efd
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
@@ -1295,6 +1295,7 @@ package android {
    field public static final int spinnerMode = 16843505; // 0x10102f1
    field public static final int spinnerStyle = 16842881; // 0x1010081
    field public static final int spinnersShown = 16843595; // 0x101034b
    field public static final int splashScreenTheme = 16844336; // 0x1010630
    field public static final int splitMotionEvents = 16843503; // 0x10102ef
    field public static final int splitName = 16844105; // 0x1010549
    field public static final int splitTrack = 16843852; // 0x101044c
@@ -1655,6 +1656,10 @@ package android {
    field public static final int windowShowAnimation = 16842934; // 0x10100b6
    field public static final int windowShowWallpaper = 16843410; // 0x1010292
    field public static final int windowSoftInputMode = 16843307; // 0x101022b
    field public static final int windowSplashScreenAnimatedIcon = 16844333; // 0x101062d
    field public static final int windowSplashScreenAnimationDuration = 16844334; // 0x101062e
    field public static final int windowSplashScreenBackground = 16844332; // 0x101062c
    field public static final int windowSplashScreenBrandingImage = 16844335; // 0x101062f
    field public static final int windowSplashscreenContent = 16844132; // 0x1010564
    field @Deprecated public static final int windowSwipeToDismiss = 16843763; // 0x10103f3
    field public static final int windowTitleBackgroundStyle = 16842844; // 0x101005c
@@ -3865,6 +3870,7 @@ package android.app {
    method @Nullable public android.net.Uri getReferrer();
    method public int getRequestedOrientation();
    method public final android.view.SearchEvent getSearchEvent();
    method @NonNull public final android.window.SplashScreen getSplashScreen();
    method public int getTaskId();
    method public final CharSequence getTitle();
    method public final int getTitleColor();
@@ -6653,6 +6659,7 @@ package android.app {
    method @NonNull public java.time.LocalTime getCustomNightModeEnd();
    method @NonNull public java.time.LocalTime getCustomNightModeStart();
    method public int getNightMode();
    method public void setApplicationNightMode(int);
    method public void setCustomNightModeEnd(@NonNull java.time.LocalTime);
    method public void setCustomNightModeStart(@NonNull java.time.LocalTime);
    method public void setNightMode(int);
@@ -12779,6 +12786,7 @@ package android.content.pm {
    method @NonNull public android.content.pm.ShortcutInfo.Builder setPersons(@NonNull android.app.Person[]);
    method @NonNull public android.content.pm.ShortcutInfo.Builder setRank(int);
    method @NonNull public android.content.pm.ShortcutInfo.Builder setShortLabel(@NonNull CharSequence);
    method @NonNull public android.content.pm.ShortcutInfo.Builder setStartingTheme(int);
  }
  public class ShortcutManager {
@@ -55824,6 +55832,25 @@ package android.widget.inline {
}
package android.window {
  public interface SplashScreen {
    method public void setOnExitAnimationListener(@Nullable android.window.SplashScreen.OnExitAnimationListener);
  }
  public static interface SplashScreen.OnExitAnimationListener {
    method public void onSplashScreenExit(@NonNull android.window.SplashScreenView);
  }
  public final class SplashScreenView extends android.widget.FrameLayout {
    method public long getIconAnimationDurationMillis();
    method public long getIconAnimationStartMillis();
    method @Nullable public android.view.View getIconView();
    method public void remove();
  }
}
package javax.microedition.khronos.egl {
  public interface EGL {
+5 −0
Original line number Diff line number Diff line
@@ -2729,6 +2729,10 @@ package android.window {
    field public static final int FEATURE_WINDOW_TOKENS = 2; // 0x2
  }

  public final class SplashScreenView extends android.widget.FrameLayout {
    method @Nullable public android.view.View getBrandingView();
  }

  public final class StartingWindowInfo implements android.os.Parcelable {
    ctor public StartingWindowInfo();
    method public int describeContents();
@@ -2748,6 +2752,7 @@ package android.window {
  public class TaskOrganizer extends android.window.WindowOrganizer {
    ctor public TaskOrganizer();
    method @BinderThread public void addStartingWindow(@NonNull android.window.StartingWindowInfo, @NonNull android.os.IBinder);
    method @BinderThread public void copySplashScreenView(int);
    method @Nullable @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_TASKS) public void createRootTask(int, int, @Nullable android.os.IBinder);
    method @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_TASKS) public boolean deleteRootTask(@NonNull android.window.WindowContainerToken);
    method @Nullable @RequiresPermission(android.Manifest.permission.MANAGE_ACTIVITY_TASKS) public java.util.List<android.app.ActivityManager.RunningTaskInfo> getChildTasks(@NonNull android.window.WindowContainerToken, @NonNull int[]);
+23 −0
Original line number Diff line number Diff line
@@ -139,6 +139,8 @@ import android.view.translation.UiTranslationController;
import android.widget.AdapterView;
import android.widget.Toast;
import android.widget.Toolbar;
import android.window.SplashScreen;
import android.window.SplashScreenView;

import com.android.internal.R;
import com.android.internal.annotations.GuardedBy;
@@ -961,6 +963,10 @@ public class Activity extends ContextThemeWrapper

    private UiTranslationController mUiTranslationController;

    private SplashScreen mSplashScreen;
    /** @hide */
    SplashScreenView mSplashScreenView;

    private final WindowControllerCallback mWindowControllerCallback =
            new WindowControllerCallback() {
        /**
@@ -1602,6 +1608,23 @@ public class Activity extends ContextThemeWrapper

    }

    /**
     * Get the interface that activity use to talk to the splash screen.
     * @see SplashScreen
     */
    public final @NonNull SplashScreen getSplashScreen() {
        return getOrCreateSplashScreen();
    }

    private SplashScreen getOrCreateSplashScreen() {
        synchronized (this) {
            if (mSplashScreen == null) {
                mSplashScreen = new SplashScreen.SplashScreenImpl(this);
            }
            return mSplashScreen;
        }
    }

    /**
     * Same as {@link #onCreate(android.os.Bundle)} but called for those activities created with
     * the attribute {@link android.R.attr#persistableMode} set to
+13 −2
Original line number Diff line number Diff line
@@ -46,9 +46,9 @@ public class ActivityClient {
    }

    /** Reports {@link Activity#onResume()} is done. */
    public void activityResumed(IBinder token) {
    public void activityResumed(IBinder token, boolean handleSplashScreenExit) {
        try {
            getActivityClientController().activityResumed(token);
            getActivityClientController().activityResumed(token, handleSplashScreenExit);
        } catch (RemoteException e) {
            e.rethrowFromSystemServer();
        }
@@ -488,6 +488,17 @@ public class ActivityClient {
        }
    }

    /**
     * Reports the splash screen view has attached to client.
     */
    void reportSplashScreenAttached(IBinder token) {
        try {
            getActivityClientController().splashScreenAttached(token);
        } catch (RemoteException e) {
            e.rethrowFromSystemServer();
        }
    }

    public static ActivityClient getInstance() {
        return sInstance.get();
    }
+19 −0
Original line number Diff line number Diff line
@@ -159,6 +159,12 @@ public class ActivityOptions {
     */
    public static final String KEY_ANIM_START_LISTENER = "android:activity.animStartListener";

    /**
     * Specific a theme for a splash screen window.
     * @hide
     */
    public static final String KEY_SPLASH_SCREEN_THEME = "android.activity.splashScreenTheme";

    /**
     * Callback for when the last frame of the animation is played.
     * @hide
@@ -398,6 +404,7 @@ public class ActivityOptions {
    private IBinder mLaunchCookie;
    private IRemoteTransition mRemoteTransition;
    private boolean mOverrideTaskTransition;
    private int mSplashScreenThemeResId;

    /**
     * Create an ActivityOptions specifying a custom animation to run when
@@ -1147,6 +1154,7 @@ public class ActivityOptions {
        mRemoteTransition = IRemoteTransition.Stub.asInterface(opts.getBinder(
                KEY_REMOTE_TRANSITION));
        mOverrideTaskTransition = opts.getBoolean(KEY_OVERRIDE_TASK_TRANSITION);
        mSplashScreenThemeResId = opts.getInt(KEY_SPLASH_SCREEN_THEME);
    }

    /**
@@ -1332,6 +1340,14 @@ public class ActivityOptions {
        return mLockTaskMode;
    }

    /**
     * Gets whether the activity want to be launched as other theme for the splash screen.
     * @hide
     */
    public int getSplashScreenThemeResId() {
        return mSplashScreenThemeResId;
    }

    /**
     * Sets whether the activity is to be launched into LockTask mode.
     *
@@ -1838,6 +1854,9 @@ public class ActivityOptions {
        if (mOverrideTaskTransition) {
            b.putBoolean(KEY_OVERRIDE_TASK_TRANSITION, mOverrideTaskTransition);
        }
        if (mSplashScreenThemeResId != 0) {
            b.putInt(KEY_SPLASH_SCREEN_THEME, mSplashScreenThemeResId);
        }
        return b;
    }

Loading