Skip to content

Commit 0b80019

Browse files
author
Dianne Hackborn
committed
Don't crash in window manager if we fail getting .apk resources.
This normally shouldn't noramlly happen, but it can in the case of bug 6647334 (crash in LoadedApk.makeApplication) where the package manager information becomes inconsistent, and it could also happen if an app was uninstalled or started updating at just the right time during a launch. Bug: 6647334 Change-Id: Iba22efe1d646cdac46099b2135466309577dfa54
1 parent d5353b4 commit 0b80019

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

services/java/com/android/server/wm/WindowManagerService.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4145,6 +4145,11 @@ public void setAppStartingWindow(IBinder token, String pkg,
41454145
if (theme != 0) {
41464146
AttributeCache.Entry ent = AttributeCache.instance().get(pkg, theme,
41474147
com.android.internal.R.styleable.Window);
4148+
if (ent == null) {
4149+
// Whoops! App doesn't exist. Um. Okay. We'll just
4150+
// pretend like we didn't see that.
4151+
return;
4152+
}
41484153
if (ent.array.getBoolean(
41494154
com.android.internal.R.styleable.Window_windowIsTranslucent, false)) {
41504155
return;

0 commit comments

Comments
 (0)