Merge "Protect against NPE while to updating service connection activities." into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
cef12198a7
@@ -753,7 +753,7 @@ public final class ActiveServices {
|
|||||||
|
|
||||||
public void updateServiceConnectionActivitiesLocked(ProcessRecord clientProc) {
|
public void updateServiceConnectionActivitiesLocked(ProcessRecord clientProc) {
|
||||||
ArraySet<ProcessRecord> updatedProcesses = null;
|
ArraySet<ProcessRecord> updatedProcesses = null;
|
||||||
for (int i=0; i<clientProc.connections.size(); i++) {
|
for (int i = 0; i < clientProc.connections.size(); i++) {
|
||||||
final ConnectionRecord conn = clientProc.connections.valueAt(i);
|
final ConnectionRecord conn = clientProc.connections.valueAt(i);
|
||||||
final ProcessRecord proc = conn.binding.service.app;
|
final ProcessRecord proc = conn.binding.service.app;
|
||||||
if (proc == null || proc == clientProc) {
|
if (proc == null || proc == clientProc) {
|
||||||
|
|||||||
@@ -1338,7 +1338,9 @@ public final class ActivityStackSupervisor implements DisplayListener {
|
|||||||
|
|
||||||
// Update any services we are bound to that might care about whether
|
// Update any services we are bound to that might care about whether
|
||||||
// their client may have activities.
|
// their client may have activities.
|
||||||
mService.mServices.updateServiceConnectionActivitiesLocked(r.app);
|
if (r.app != null) {
|
||||||
|
mService.mServices.updateServiceConnectionActivitiesLocked(r.app);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user