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

Commit 23ce8aee authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Automerger Merge Worker
Browse files

Merge "Release the surface control view host when addWindow fail." into tm-dev am: e3ae5cda

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

Change-Id: Id5fd4a1a9dc930036421a933de18444497e91642
parents a2f3b52f e3ae5cda
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -364,6 +364,12 @@ public class StartingSurfaceDrawer {
                final StartingWindowRecord record = mStartingWindowRecords.get(taskId);
                final StartingWindowRecord record = mStartingWindowRecords.get(taskId);
                final SplashScreenView contentView = viewSupplier.get();
                final SplashScreenView contentView = viewSupplier.get();
                record.mBGColor = contentView.getInitBackgroundColor();
                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) {
        } catch (RuntimeException e) {
            // don't crash if something else bad happens, for example a
            // don't crash if something else bad happens, for example a