Skip to content

Commit 065eea3

Browse files
committed
Android 12: Fix splash screen
Signed-off-by: tiann <[email protected]>
1 parent fb0a654 commit 065eea3

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

VirtualApp/lib/src/main/java/android/app/ClientTransactionHandler.java

+15
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import android.content.res.CompatibilityInfo;
2424
import android.content.res.Configuration;
2525
import android.os.IBinder;
26+
import android.os.Parcelable;
2627
import android.util.MergedConfiguration;
2728
import android.view.DisplayAdjustments;
2829

@@ -123,6 +124,20 @@ public abstract void handlePictureInPictureModeChanged(IBinder token, boolean is
123124
// Android 11
124125
public abstract void handlePictureInPictureRequested(IBinder token);
125126

127+
/** Signal to an activity (that is currently in PiP) of PiP state changes. */
128+
public abstract void handlePictureInPictureStateChanged(ActivityThread.ActivityClientRecord r,
129+
Parcelable pipState);
130+
131+
/** Whether the activity want to handle splash screen exit animation */
132+
public abstract boolean isHandleSplashScreenExit(IBinder token);
133+
134+
/** Attach a splash screen window view to the top of the activity */
135+
public abstract void handleAttachSplashScreenView(ActivityThread.ActivityClientRecord r,
136+
Parcelable parcelable);
137+
138+
/** Hand over the splash screen window view to the activity */
139+
public abstract void handOverSplashScreenView(ActivityThread.ActivityClientRecord r);
140+
126141
/** Update window visibility. */
127142
public abstract void handleWindowVisibility(IBinder token, boolean show);
128143
/** Perform activity launch. */

VirtualApp/lib/src/main/java/android/app/TransactionHandlerProxy.java

+21
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import android.content.res.CompatibilityInfo;
1111
import android.content.res.Configuration;
1212
import android.os.IBinder;
13+
import android.os.Parcelable;
1314
import android.util.Log;
1415
import android.util.MergedConfiguration;
1516
import android.view.DisplayAdjustments;
@@ -132,6 +133,26 @@ public void handlePictureInPictureRequested(IBinder token) {
132133
originalHandler.handlePictureInPictureRequested(token);
133134
}
134135

136+
@Override
137+
public void handlePictureInPictureStateChanged(ActivityClientRecord r, Parcelable pipState) {
138+
originalHandler.handlePictureInPictureStateChanged(r, pipState);
139+
}
140+
141+
@Override
142+
public boolean isHandleSplashScreenExit(IBinder token) {
143+
return originalHandler.isHandleSplashScreenExit(token);
144+
}
145+
146+
@Override
147+
public void handleAttachSplashScreenView(ActivityClientRecord r, Parcelable parcelable) {
148+
originalHandler.handleAttachSplashScreenView(r, parcelable);
149+
}
150+
151+
@Override
152+
public void handOverSplashScreenView(ActivityClientRecord r) {
153+
originalHandler.handOverSplashScreenView(r);
154+
}
155+
135156
@Override
136157
public void handleWindowVisibility(IBinder token, boolean show) {
137158
originalHandler.handleWindowVisibility(token, show);

0 commit comments

Comments
 (0)