SystemUI: fix MediaProjection cast crash
Clicking on the "cast" icon of an app using the MediaProjection API will crash as the code assume that it is a device. java.lang.ClassCastException: android.media.projection.MediaProjectionInfo cannot be cast to android.media.MediaRouter$RouteInfo at com.android.systemui.statusbar.policy.CastControllerImpl.startCasting(CastControllerImpl.java:177) at com.android.systemui.qs.tiles.CastTile$CastDetailAdapter.onDetailItemClick(CastTile.java:237) at com.android.systemui.qs.QSDetailItems$1.onClick(QSDetailItems.java:177) at android.view.View.performClick(View.java:4756) at android.view.View$PerformClick.run(View.java:19749) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5221) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693) Change-Id: Icfdf745c03da7bd1bbb228e06005f55324c1b8fa
Loading
Please register or sign in to comment