Merge "Work on issue #28689719: Runtime restart" into nyc-dev
am: 77ad5f1657
* commit '77ad5f1657a8bef6b28f69f9bd8a2d1978c88a57':
Work on issue #28689719: Runtime restart
Change-Id: I29e0ef82bed0df030939b198d5a238405dc7486a
This commit is contained in:
@@ -1046,11 +1046,17 @@ public final class LoadedApk {
|
||||
@Override
|
||||
public void performReceive(Intent intent, int resultCode, String data,
|
||||
Bundle extras, boolean ordered, boolean sticky, int sendingUser) {
|
||||
LoadedApk.ReceiverDispatcher rd = mDispatcher.get();
|
||||
final LoadedApk.ReceiverDispatcher rd;
|
||||
if (intent == null) {
|
||||
Log.wtf(TAG, "Null intent received");
|
||||
rd = null;
|
||||
} else {
|
||||
rd = mDispatcher.get();
|
||||
}
|
||||
if (ActivityThread.DEBUG_BROADCAST) {
|
||||
int seq = intent.getIntExtra("seq", -1);
|
||||
Slog.i(ActivityThread.TAG, "Receiving broadcast " + intent.getAction() + " seq=" + seq
|
||||
+ " to " + (rd != null ? rd.mReceiver : null));
|
||||
Slog.i(ActivityThread.TAG, "Receiving broadcast " + intent.getAction()
|
||||
+ " seq=" + seq + " to " + (rd != null ? rd.mReceiver : null));
|
||||
}
|
||||
if (rd != null) {
|
||||
rd.performReceive(intent, resultCode, data, extras,
|
||||
|
||||
@@ -7057,6 +7057,15 @@ public final class ActivityManagerService extends ActivityManagerNative
|
||||
return ((PendingIntentRecord)target).sendWithResult(code, intent, resolvedType,
|
||||
finishedReceiver, requiredPermission, options);
|
||||
} else {
|
||||
if (intent == null) {
|
||||
// Weird case: someone has given us their own custom IIntentSender, and now
|
||||
// they have someone else trying to send to it but of course this isn't
|
||||
// really a PendingIntent, so there is no base Intent, and the caller isn't
|
||||
// supplying an Intent... but we never want to dispatch a null Intent to
|
||||
// a receiver, so um... let's make something up.
|
||||
Slog.wtf(TAG, "Can't use null intent with direct IIntentSender call");
|
||||
intent = new Intent(Intent.ACTION_MAIN);
|
||||
}
|
||||
try {
|
||||
target.send(code, intent, resolvedType, null, requiredPermission, options);
|
||||
} catch (RemoteException e) {
|
||||
|
||||
@@ -38,7 +38,6 @@ import android.content.pm.PackageManager;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.DeadObjectException;
|
||||
import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
import android.os.Looper;
|
||||
|
||||
Reference in New Issue
Block a user