Loading core/java/android/app/ActivityThread.java +7 −4 Original line number Diff line number Diff line Loading @@ -407,7 +407,7 @@ public final class ActivityThread extends ClientTransactionHandler private int mLastSessionId; // Holds the value of the last reported device ID value from the server for the top activity. int mLastReportedDeviceId; int mLastReportedDeviceId = Context.DEVICE_ID_DEFAULT; final ArrayMap<IBinder, CreateServiceData> mServicesData = new ArrayMap<>(); @UnsupportedAppUsage final ArrayMap<IBinder, Service> mServices = new ArrayMap<>(); Loading Loading @@ -4856,12 +4856,15 @@ public final class ActivityThread extends ClientTransactionHandler service.attach(context, this, data.info.name, data.token, app, ActivityManager.getService()); if (!service.isUiContext()) { // WindowProviderService is a UI Context. if (mLastReportedDeviceId == Context.DEVICE_ID_DEFAULT) { service.updateDeviceId(mLastReportedDeviceId); } else { VirtualDeviceManager vdm = context.getSystemService(VirtualDeviceManager.class); if (mLastReportedDeviceId == Context.DEVICE_ID_DEFAULT || vdm.isValidVirtualDeviceId(mLastReportedDeviceId)) { if (vdm != null && vdm.isValidVirtualDeviceId(mLastReportedDeviceId)) { service.updateDeviceId(mLastReportedDeviceId); } } } service.onCreate(); mServicesData.put(data.token, data); mServices.put(data.token, service); Loading Loading
core/java/android/app/ActivityThread.java +7 −4 Original line number Diff line number Diff line Loading @@ -407,7 +407,7 @@ public final class ActivityThread extends ClientTransactionHandler private int mLastSessionId; // Holds the value of the last reported device ID value from the server for the top activity. int mLastReportedDeviceId; int mLastReportedDeviceId = Context.DEVICE_ID_DEFAULT; final ArrayMap<IBinder, CreateServiceData> mServicesData = new ArrayMap<>(); @UnsupportedAppUsage final ArrayMap<IBinder, Service> mServices = new ArrayMap<>(); Loading Loading @@ -4856,12 +4856,15 @@ public final class ActivityThread extends ClientTransactionHandler service.attach(context, this, data.info.name, data.token, app, ActivityManager.getService()); if (!service.isUiContext()) { // WindowProviderService is a UI Context. if (mLastReportedDeviceId == Context.DEVICE_ID_DEFAULT) { service.updateDeviceId(mLastReportedDeviceId); } else { VirtualDeviceManager vdm = context.getSystemService(VirtualDeviceManager.class); if (mLastReportedDeviceId == Context.DEVICE_ID_DEFAULT || vdm.isValidVirtualDeviceId(mLastReportedDeviceId)) { if (vdm != null && vdm.isValidVirtualDeviceId(mLastReportedDeviceId)) { service.updateDeviceId(mLastReportedDeviceId); } } } service.onCreate(); mServicesData.put(data.token, data); mServices.put(data.token, service); Loading