@Override public void handleMessage(Message msg) { IBinder token = (IBinder) msg.obj; BroadcastRecord r = mBroadcastRecords.remove(token); if (r != null) { VLog.w(TAG, "Broadcast timeout, cancel to dispatch it."); r.pendingResult.finish(); } } }
void broadcastFinish(PendingResultData res) { synchronized (mBroadcastRecords) { BroadcastRecord record = mBroadcastRecords.remove(res.mToken); if (record == null) { VLog.e(TAG, "Unable to find the BroadcastRecord by token: " + res.mToken); } } mTimeoutHandler.removeMessages(0, res.mToken); res.finish(); }
public void stopApp(String packageName) { synchronized (mBroadcastRecords) { Iterator<Map.Entry<IBinder, BroadcastRecord>> iterator = mBroadcastRecords.entrySet().iterator(); while (iterator.hasNext()) { Map.Entry<IBinder, BroadcastRecord> entry = iterator.next(); BroadcastRecord record = entry.getValue(); if (record.receiverInfo.packageName.equals(packageName)) { record.pendingResult.finish(); iterator.remove(); } } } synchronized (mReceivers) { List<BroadcastReceiver> receivers = mReceivers.get(packageName); if (receivers != null) { for (BroadcastReceiver r : receivers) { mContext.unregisterReceiver(r); } } mReceivers.remove(packageName); } }
private void performScheduleReceiver(IVClient client, int vuid, ActivityInfo info, Intent intent, PendingResultData result) { ComponentName componentName = ComponentUtils.toComponentName(info); BroadcastSystem.get().broadcastSent(vuid, info, result); try { client.scheduleReceiver(info.processName, componentName, intent, result); } catch (Throwable e) { if (result != null) { result.finish(); } } }
@Override public void handleMessage(Message msg) { IBinder token = (IBinder) msg.obj; BroadcastRecord r = mBroadcastRecords.remove(token); if (r != null) { VLog.w(TAG, "Broadcast timeout, cancel to dispatch it."); r.pendingResult.finish(); } } }
@Override public void handleMessage(Message msg) { IBinder token = (IBinder) msg.obj; BroadcastRecord r = mBroadcastRecords.remove(token); if (r != null) { VLog.w(TAG, "Broadcast timeout, cancel to dispatch it."); r.pendingResult.finish(); } } }
void broadcastFinish(PendingResultData res) { synchronized (mBroadcastRecords) { BroadcastRecord record = mBroadcastRecords.remove(res.mToken); if (record == null) { VLog.e(TAG, "Unable to find the BroadcastRecord by token: " + res.mToken); } } mTimeoutHandler.removeMessages(0, res.mToken); res.finish(); }
void broadcastFinish(PendingResultData res) { synchronized (mBroadcastRecords) { BroadcastRecord record = mBroadcastRecords.remove(res.mToken); if (record == null) { VLog.e(TAG, "Unable to find the BroadcastRecord by token: " + res.mToken); } } mTimeoutHandler.removeMessages(0, res.mToken); res.finish(); }
public void stopApp(String packageName) { synchronized (mBroadcastRecords) { Iterator<Map.Entry<IBinder, BroadcastRecord>> iterator = mBroadcastRecords.entrySet().iterator(); while (iterator.hasNext()) { Map.Entry<IBinder, BroadcastRecord> entry = iterator.next(); BroadcastRecord record = entry.getValue(); if (record.receiverInfo.packageName.equals(packageName)) { record.pendingResult.finish(); iterator.remove(); } } } synchronized (mReceivers) { List<BroadcastReceiver> receivers = mReceivers.get(packageName); if (receivers != null) { for (BroadcastReceiver r : receivers) { mContext.unregisterReceiver(r); } } mReceivers.remove(packageName); } }
public void stopApp(String packageName) { synchronized (mBroadcastRecords) { Iterator<Map.Entry<IBinder, BroadcastRecord>> iterator = mBroadcastRecords.entrySet().iterator(); while (iterator.hasNext()) { Map.Entry<IBinder, BroadcastRecord> entry = iterator.next(); BroadcastRecord record = entry.getValue(); if (record.receiverInfo.packageName.equals(packageName)) { record.pendingResult.finish(); iterator.remove(); } } } synchronized (mReceivers) { List<BroadcastReceiver> receivers = mReceivers.get(packageName); if (receivers != null) { for (BroadcastReceiver r : receivers) { mContext.unregisterReceiver(r); } } mReceivers.remove(packageName); } }
private void performScheduleReceiver(IVClient client, int vuid, ActivityInfo info, Intent intent, PendingResultData result) { ComponentName componentName = ComponentUtils.toComponentName(info); BroadcastSystem.get().broadcastSent(vuid, info, result); try { client.scheduleReceiver(info.processName, componentName, intent, result); } catch (Throwable e) { if (result != null) { result.finish(); } } }
private void performScheduleReceiver(IVClient client, int vuid, ActivityInfo info, Intent intent, PendingResultData result) { ComponentName componentName = ComponentUtils.toComponentName(info); BroadcastSystem.get().broadcastSent(vuid, info, result); try { client.scheduleReceiver(info.processName, componentName, intent, result); } catch (Throwable e) { if (result != null) { result.finish(); } } }