File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
core/java/android/service/dreams Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -612,18 +612,23 @@ private final void attach(IBinder windowToken) {
612612 View .SYSTEM_UI_FLAG_LOW_PROFILE );
613613 getWindowManager ().addView (mWindow .getDecorView (), mWindow .getAttributes ());
614614 } catch (Throwable t ) {
615- Slog .w ("Crashed adding window view" , t );
615+ Slog .w (TAG , "Crashed adding window view" , t );
616616 safelyFinish ();
617617 return ;
618618 }
619619
620620 // start it up
621- try {
622- onDreamingStarted ();
623- } catch (Throwable t ) {
624- Slog .w ("Crashed in onDreamingStarted()" , t );
625- safelyFinish ();
626- }
621+ mHandler .post (new Runnable () {
622+ @ Override
623+ public void run () {
624+ try {
625+ onDreamingStarted ();
626+ } catch (Throwable t ) {
627+ Slog .w (TAG , "Crashed in onDreamingStarted()" , t );
628+ safelyFinish ();
629+ }
630+ }
631+ });
627632 }
628633
629634 private void safelyFinish () {
You can’t perform that action at this time.
0 commit comments