am 5a54e980: am 6947cc59: Merge "Preventing the hierarchy viewer from getting stuck, once when trying to load the window data for SurfaceView and the Wallpaper, and in the case the captured node has disappeared." into gingerbread
Merge commit '5a54e98022d640900f94102c077d8dff447f3c76' * commit '5a54e98022d640900f94102c077d8dff447f3c76': Preventing the hierarchy viewer from getting stuck, once when trying to load the window data for SurfaceView and the Wallpaper, and in the case the captured node has disappeared.
This commit is contained in:
@@ -4798,6 +4798,8 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
Parcel data = null;
|
||||
Parcel reply = null;
|
||||
|
||||
BufferedWriter out = null;
|
||||
|
||||
// Any uncaught exception will crash the system process
|
||||
try {
|
||||
// Find the hashcode of the window
|
||||
@@ -4835,6 +4837,12 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
|
||||
reply.readException();
|
||||
|
||||
if (!client.isOutputShutdown()) {
|
||||
out = new BufferedWriter(new OutputStreamWriter(client.getOutputStream()));
|
||||
out.write("DONE\n");
|
||||
out.flush();
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
Slog.w(TAG, "Could not send command " + command + " with parameters " + parameters, e);
|
||||
success = false;
|
||||
@@ -4845,6 +4853,13 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
if (reply != null) {
|
||||
reply.recycle();
|
||||
}
|
||||
if (out != null) {
|
||||
try {
|
||||
out.close();
|
||||
} catch (IOException e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return success;
|
||||
|
||||
Reference in New Issue
Block a user