Merge "Fix a SecurityExcption when trying to start low-light dream." into tm-qpr-dev

This commit is contained in:
William Leshner
2023-03-14 20:01:10 +00:00
committed by Android (Google) Code Review

View File

@@ -1362,6 +1362,11 @@ public class DreamService extends Service implements Window.Callback {
if (!ActivityTaskManager.getService().startDreamActivity(i)) { if (!ActivityTaskManager.getService().startDreamActivity(i)) {
detach(); detach();
} }
} catch (SecurityException e) {
Log.w(mTag,
"Received SecurityException trying to start DreamActivity. "
+ "Aborting dream start.");
detach();
} catch (RemoteException e) { } catch (RemoteException e) {
Log.w(mTag, "Could not connect to activity task manager to start dream activity"); Log.w(mTag, "Could not connect to activity task manager to start dream activity");
e.rethrowFromSystemServer(); e.rethrowFromSystemServer();