summaryrefslogtreecommitdiff
path: root/core/java/android/app/ApplicationThreadNative.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2009-10-05 13:58:17 -0700
committerDianne Hackborn <hackbod@google.com>2009-10-05 15:52:32 -0700
commit68d881cf2d2b252f6f795cd64d43e316a1d736e5 (patch)
tree3d0f7cb91e612df7a5663ceefec0b5439c907642 /core/java/android/app/ApplicationThreadNative.java
parent71060f29855745893c122e8b93cf7a723186931b (diff)
Fix issue #2166755: BroadcastReceiver trying to return result during a non-ordered broadcast
Tell the broadcast receiver whether it is getting an initial sticky value, so it will be quiet about attempts to do ordered broadcast stuff. Note that the original bug being reported was not actually a crash, just an error log. So all we are doing here is making the log quieter. Change-Id: Iaf1b718d82093ec1197142410a64feff47eb3859
Diffstat (limited to 'core/java/android/app/ApplicationThreadNative.java')
-rw-r--r--core/java/android/app/ApplicationThreadNative.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/java/android/app/ApplicationThreadNative.java b/core/java/android/app/ApplicationThreadNative.java
index 928981d0c2d6..a772a8f78ddf 100644
--- a/core/java/android/app/ApplicationThreadNative.java
+++ b/core/java/android/app/ApplicationThreadNative.java
@@ -317,8 +317,9 @@ public abstract class ApplicationThreadNative extends Binder
String dataStr = data.readString();
Bundle extras = data.readBundle();
boolean ordered = data.readInt() != 0;
+ boolean sticky = data.readInt() != 0;
scheduleRegisteredReceiver(receiver, intent,
- resultCode, dataStr, extras, ordered);
+ resultCode, dataStr, extras, ordered, sticky);
return true;
}
@@ -716,7 +717,7 @@ class ApplicationThreadProxy implements IApplicationThread {
}
public void scheduleRegisteredReceiver(IIntentReceiver receiver, Intent intent,
- int resultCode, String dataStr, Bundle extras, boolean ordered)
+ int resultCode, String dataStr, Bundle extras, boolean ordered, boolean sticky)
throws RemoteException {
Parcel data = Parcel.obtain();
data.writeInterfaceToken(IApplicationThread.descriptor);
@@ -726,6 +727,7 @@ class ApplicationThreadProxy implements IApplicationThread {
data.writeString(dataStr);
data.writeBundle(extras);
data.writeInt(ordered ? 1 : 0);
+ data.writeInt(sticky ? 1 : 0);
mRemote.transact(SCHEDULE_REGISTERED_RECEIVER_TRANSACTION, data, null,
IBinder.FLAG_ONEWAY);
data.recycle();