summaryrefslogtreecommitdiff
path: root/core/java/android/app/ApplicationThreadNative.java
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2013-10-08 17:01:30 -0700
committerJeff Sharkey <jsharkey@android.com>2013-10-08 17:02:26 -0700
commitdd97f4233fa8cca2a258c568f56a77c9bdc5fe74 (patch)
tree01678c97c87f1db406ed4bbd5ada093999dc6c46 /core/java/android/app/ApplicationThreadNative.java
parenta6af40cda29837fb68507f431ee5a179db93de28 (diff)
Install providers enabled after app started.
When an app has already been started, and a ContentProvider component is enabled with DONT_KILL_APP, use the existing ProcessRecord to install the provider. Bug: 11118692 Change-Id: I990f18b337eb19768ee1db895f1e2eb982046cce
Diffstat (limited to 'core/java/android/app/ApplicationThreadNative.java')
-rw-r--r--core/java/android/app/ApplicationThreadNative.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/core/java/android/app/ApplicationThreadNative.java b/core/java/android/app/ApplicationThreadNative.java
index e40a04b41ec0..347d43f63a69 100644
--- a/core/java/android/app/ApplicationThreadNative.java
+++ b/core/java/android/app/ApplicationThreadNative.java
@@ -618,6 +618,15 @@ public abstract class ApplicationThreadNative extends Binder
reply.writeNoException();
return true;
}
+
+ case SCHEDULE_INSTALL_PROVIDER_TRANSACTION:
+ {
+ data.enforceInterface(IApplicationThread.descriptor);
+ ProviderInfo provider = ProviderInfo.CREATOR.createFromParcel(data);
+ scheduleInstallProvider(provider);
+ reply.writeNoException();
+ return true;
+ }
}
return super.onTransact(code, data, reply, flags);
@@ -1248,4 +1257,13 @@ class ApplicationThreadProxy implements IApplicationThread {
mRemote.transact(SET_PROCESS_STATE_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
data.recycle();
}
+
+ @Override
+ public void scheduleInstallProvider(ProviderInfo provider) throws RemoteException {
+ Parcel data = Parcel.obtain();
+ data.writeInterfaceToken(IApplicationThread.descriptor);
+ provider.writeToParcel(data, 0);
+ mRemote.transact(SCHEDULE_INSTALL_PROVIDER_TRANSACTION, data, null, IBinder.FLAG_ONEWAY);
+ data.recycle();
+ }
}