am 5d0a560c: am 4a01f2b5: Merge "delay onDreamingStarted() to work around asynchrony." into jb-mr1-dev
* commit '5d0a560ca4e455bfe8f77c2872a479e210b38dcf': delay onDreamingStarted() to work around asynchrony.
This commit is contained in:
@@ -612,18 +612,23 @@ public class DreamService extends Service implements Window.Callback {
|
|||||||
View.SYSTEM_UI_FLAG_LOW_PROFILE);
|
View.SYSTEM_UI_FLAG_LOW_PROFILE);
|
||||||
getWindowManager().addView(mWindow.getDecorView(), mWindow.getAttributes());
|
getWindowManager().addView(mWindow.getDecorView(), mWindow.getAttributes());
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
Slog.w("Crashed adding window view", t);
|
Slog.w(TAG, "Crashed adding window view", t);
|
||||||
safelyFinish();
|
safelyFinish();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// start it up
|
// start it up
|
||||||
try {
|
mHandler.post(new Runnable() {
|
||||||
onDreamingStarted();
|
@Override
|
||||||
} catch (Throwable t) {
|
public void run() {
|
||||||
Slog.w("Crashed in onDreamingStarted()", t);
|
try {
|
||||||
safelyFinish();
|
onDreamingStarted();
|
||||||
}
|
} catch (Throwable t) {
|
||||||
|
Slog.w(TAG, "Crashed in onDreamingStarted()", t);
|
||||||
|
safelyFinish();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void safelyFinish() {
|
private void safelyFinish() {
|
||||||
|
|||||||
Reference in New Issue
Block a user