Merge "Fix issue #3515088: Don't be so aggressive trying to reclaim memory" into honeycomb-mr1

This commit is contained in:
Dianne Hackborn
2011-03-07 18:20:23 -08:00
committed by Android (Google) Code Review

View File

@@ -1606,13 +1606,9 @@ public final class ViewRoot extends Handler implements ViewParent,
return; return;
} catch (IllegalArgumentException e) { } catch (IllegalArgumentException e) {
Log.e(TAG, "IllegalArgumentException locking surface", e); Log.e(TAG, "IllegalArgumentException locking surface", e);
try { // Don't assume this is due to out of memory, it could be
if (!sWindowSession.outOfMemory(mWindow)) { // something else, and if it is something else then we could
Slog.w(TAG, "No processes killed for memory; killing self"); // kill stuff (or ourself) for no reason.
Process.killProcess(Process.myPid());
}
} catch (RemoteException ex) {
}
mLayoutRequested = true; // ask wm for a new surface next time. mLayoutRequested = true; // ask wm for a new surface next time.
return; return;
} }