@Override public void unbindFinished(IBinder token, Intent service, boolean doRebind, int userId) { synchronized (this) { ServiceRecord r = (ServiceRecord) token; if (r != null) { ServiceRecord.IntentBindRecord boundRecord = r.peekBinding(service); if (boundRecord != null) { boundRecord.doRebind = doRebind; } } } }
void addToBoundIntent(Intent intent, IServiceConnection connection) { IntentBindRecord record = peekBinding(intent); if (record == null) { record = new IntentBindRecord(); record.intent = intent; synchronized (bindings) { bindings.add(record); } } record.addConnection(connection); }
@Override public void publishService(IBinder token, Intent intent, IBinder service, int userId) { synchronized (this) { ServiceRecord r = (ServiceRecord) token; if (r != null) { ServiceRecord.IntentBindRecord boundRecord = r.peekBinding(intent); if (boundRecord != null) { boundRecord.binder = service; for (IServiceConnection conn : boundRecord.connections) { ComponentName component = ComponentUtils.toComponentName(r.serviceInfo); connectService(conn, component, boundRecord, false); } } } } }
@Override public IBinder peekService(Intent service, String resolvedType, int userId) { synchronized (this) { ServiceInfo serviceInfo = resolveServiceInfo(service, userId); if (serviceInfo == null) { return null; } ServiceRecord r = findRecordLocked(userId, serviceInfo); if (r != null) { ServiceRecord.IntentBindRecord boundRecord = r.peekBinding(service); if (boundRecord != null) { return boundRecord.binder; } } return null; } }
return 0; ServiceRecord.IntentBindRecord boundRecord = r.peekBinding(service);
@Override public void unbindFinished(IBinder token, Intent service, boolean doRebind, int userId) { synchronized (this) { ServiceRecord r = (ServiceRecord) token; if (r != null) { ServiceRecord.IntentBindRecord boundRecord = r.peekBinding(service); if (boundRecord != null) { boundRecord.doRebind = doRebind; } } } }
@Override public void unbindFinished(IBinder token, Intent service, boolean doRebind, int userId) { synchronized (this) { ServiceRecord r = (ServiceRecord) token; if (r != null) { ServiceRecord.IntentBindRecord boundRecord = r.peekBinding(service); if (boundRecord != null) { boundRecord.doRebind = doRebind; } } } }
void addToBoundIntent(Intent intent, IServiceConnection connection) { IntentBindRecord record = peekBinding(intent); if (record == null) { record = new IntentBindRecord(); record.intent = intent; synchronized (bindings) { bindings.add(record); } } record.addConnection(connection); }
void addToBoundIntent(Intent intent, IServiceConnection connection) { IntentBindRecord record = peekBinding(intent); if (record == null) { record = new IntentBindRecord(); record.intent = intent; synchronized (bindings) { bindings.add(record); } } record.addConnection(connection); }
@Override public IBinder peekService(Intent service, String resolvedType, int userId) { synchronized (this) { ServiceInfo serviceInfo = resolveServiceInfo(service, userId); if (serviceInfo == null) { return null; } ServiceRecord r = findRecordLocked(userId, serviceInfo); if (r != null) { ServiceRecord.IntentBindRecord boundRecord = r.peekBinding(service); if (boundRecord != null) { return boundRecord.binder; } } return null; } }
@Override public void publishService(IBinder token, Intent intent, IBinder service, int userId) { synchronized (this) { ServiceRecord r = (ServiceRecord) token; if (r != null) { ServiceRecord.IntentBindRecord boundRecord = r.peekBinding(intent); if (boundRecord != null) { boundRecord.binder = service; for (IServiceConnection conn : boundRecord.connections) { ComponentName component = ComponentUtils.toComponentName(r.serviceInfo); connectService(conn, component, boundRecord, false); } } } } }
@Override public void publishService(IBinder token, Intent intent, IBinder service, int userId) { synchronized (this) { ServiceRecord r = (ServiceRecord) token; if (r != null) { ServiceRecord.IntentBindRecord boundRecord = r.peekBinding(intent); if (boundRecord != null) { boundRecord.binder = service; for (IServiceConnection conn : boundRecord.connections) { ComponentName component = ComponentUtils.toComponentName(r.serviceInfo); connectService(conn, component, boundRecord, false); } } } } }
@Override public IBinder peekService(Intent service, String resolvedType, int userId) { synchronized (this) { ServiceInfo serviceInfo = resolveServiceInfo(service, userId); if (serviceInfo == null) { return null; } ServiceRecord r = findRecordLocked(userId, serviceInfo); if (r != null) { ServiceRecord.IntentBindRecord boundRecord = r.peekBinding(service); if (boundRecord != null) { return boundRecord.binder; } } return null; } }
return 0; ServiceRecord.IntentBindRecord boundRecord = r.peekBinding(service);
return 0; ServiceRecord.IntentBindRecord boundRecord = r.peekBinding(service);