Fix issue #3485923: Gmail crash
Allow application to try to recover if a surface OOM error happens on the client side. Change-Id: I0308bd99647a35e4bcac448340b7fc6330a828f6
This commit is contained in:
@@ -594,7 +594,7 @@ final class WindowState implements WindowManagerPolicy.WindowState {
|
||||
+ " / " + this);
|
||||
} catch (Surface.OutOfResourcesException e) {
|
||||
Slog.w(WindowManagerService.TAG, "OutOfResourcesException creating surface");
|
||||
mService.reclaimSomeSurfaceMemoryLocked(this, "create");
|
||||
mService.reclaimSomeSurfaceMemoryLocked(this, "create", true);
|
||||
return null;
|
||||
} catch (Exception e) {
|
||||
Slog.e(WindowManagerService.TAG, "Exception creating surface", e);
|
||||
@@ -628,7 +628,7 @@ final class WindowState implements WindowManagerPolicy.WindowState {
|
||||
}
|
||||
} catch (RuntimeException e) {
|
||||
Slog.w(WindowManagerService.TAG, "Error creating surface in " + w, e);
|
||||
mService.reclaimSomeSurfaceMemoryLocked(this, "create-init");
|
||||
mService.reclaimSomeSurfaceMemoryLocked(this, "create-init", true);
|
||||
}
|
||||
mLastHidden = true;
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user