Set property that terminates boot anim in WMS instead of SF
This delays setting the color mode in the SurfaceFlinger until the animation is fully finished. Bug: 63823274 Test: Manual Change-Id: I0bfcaeb05ad37efd50f4f9f7041d2a13f798cc85
This commit is contained in:
committed by
Dan Stoza
parent
61ad5ae921
commit
f4b61d9dd4
@@ -3471,21 +3471,11 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
}
|
||||
|
||||
if (!mBootAnimationStopped) {
|
||||
// Do this one time.
|
||||
Trace.asyncTraceBegin(TRACE_TAG_WINDOW_MANAGER, "Stop bootanim", 0);
|
||||
try {
|
||||
IBinder surfaceFlinger = ServiceManager.getService("SurfaceFlinger");
|
||||
if (surfaceFlinger != null) {
|
||||
Slog.i(TAG_WM, "******* TELLING SURFACE FLINGER WE ARE BOOTED!");
|
||||
Parcel data = Parcel.obtain();
|
||||
data.writeInterfaceToken("android.ui.ISurfaceComposer");
|
||||
surfaceFlinger.transact(IBinder.FIRST_CALL_TRANSACTION, // BOOT_FINISHED
|
||||
data, null, 0);
|
||||
data.recycle();
|
||||
}
|
||||
} catch (RemoteException ex) {
|
||||
Slog.e(TAG_WM, "Boot completed: SurfaceFlinger is dead!");
|
||||
}
|
||||
// stop boot animation
|
||||
// formerly we would just kill the process, but we now ask it to exit so it
|
||||
// can choose where to stop the animation.
|
||||
SystemProperties.set("service.bootanim.exit", "1");
|
||||
mBootAnimationStopped = true;
|
||||
}
|
||||
|
||||
@@ -3494,6 +3484,20 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
IBinder surfaceFlinger = ServiceManager.getService("SurfaceFlinger");
|
||||
if (surfaceFlinger != null) {
|
||||
Slog.i(TAG_WM, "******* TELLING SURFACE FLINGER WE ARE BOOTED!");
|
||||
Parcel data = Parcel.obtain();
|
||||
data.writeInterfaceToken("android.ui.ISurfaceComposer");
|
||||
surfaceFlinger.transact(IBinder.FIRST_CALL_TRANSACTION, // BOOT_FINISHED
|
||||
data, null, 0);
|
||||
data.recycle();
|
||||
}
|
||||
} catch (RemoteException ex) {
|
||||
Slog.e(TAG_WM, "Boot completed: SurfaceFlinger is dead!");
|
||||
}
|
||||
|
||||
EventLog.writeEvent(EventLogTags.WM_BOOT_ANIMATION_DONE, SystemClock.uptimeMillis());
|
||||
Trace.asyncTraceEnd(TRACE_TAG_WINDOW_MANAGER, "Stop bootanim", 0);
|
||||
mDisplayEnabled = true;
|
||||
|
||||
Reference in New Issue
Block a user