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

Commit f6d537a0 authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Android (Google) Code Review
Browse files

Merge "Release the surface control view host when addWindow fail."

parents 81e54a99 8e59bb3d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -364,6 +364,12 @@ public class StartingSurfaceDrawer {
                final StartingWindowRecord record = mStartingWindowRecords.get(taskId);
                final SplashScreenView contentView = viewSupplier.get();
                record.mBGColor = contentView.getInitBackgroundColor();
            } else {
                // release the icon view host
                final SplashScreenView contentView = viewSupplier.get();
                if (contentView.getSurfaceHost() != null) {
                    SplashScreenView.releaseIconHost(contentView.getSurfaceHost());
                }
            }
        } catch (RuntimeException e) {
            // don't crash if something else bad happens, for example a