Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a28f22e authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Fix Issue 14340: Sticky Service killed with onDestroy not called, not restarted.

Change-Id: I2804c49ad5669ca89744c6d92ead0c7d21ee31d5
http://code.google.com/p/android/issues/detail?id=14340
parent 6c2193a7
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -9114,15 +9114,17 @@ public final class ActivityManagerService extends ActivityManagerNative
                ServiceRecord.StartItem si = r.pendingStarts.remove(0);
                if (DEBUG_SERVICE) Slog.v(TAG, "Sending arguments to: "
                        + r + " " + r.intent + " args=" + si.intent);
                if (si.intent == null) {
                    // If somehow we got a dummy start at the front, then
                    // just drop it here.
                if (si.intent == null && N > 1) {
                    // If somehow we got a dummy null intent in the middle,
                    // then skip it.  DO NOT skip a null intent when it is
                    // the only one in the list -- this is to support the
                    // onStartCommand(null) case.
                    continue;
                }
                si.deliveredTime = SystemClock.uptimeMillis();
                r.deliveredStarts.add(si);
                si.deliveryCount++;
                if (si.targetPermissionUid >= 0) {
                if (si.targetPermissionUid >= 0 && si.intent != null) {
                    grantUriPermissionUncheckedFromIntentLocked(si.targetPermissionUid,
                            r.packageName, si.intent, si.getUriPermissionsLocked());
                }