分析ActivityManagerService和应用进程的IApplicationThread的通信说明:
1.ActivityManagerService调用IApplicationThread客户端的bindApplication()方法,其中IApplicationThread的定义如下:
void bindApplication(String packageName, ApplicationInfo info, List<ProviderInfo> providers,
ComponentName testName, ProfilerInfo profilerInfo, Bundle testArguments,
IInstrumentationWatcher testWatcher, IUiAutomationConnection uiAutomationConnection,
int debugMode, boolean openGlTrace, boolean restrictedBackupMode, boolean persistent,
Configuration config, CompatibilityInfo compatInfo, Map<String, IBinder> services,
Bundle coreSettings) throws RemoteException;
然后就可以看看这些参数都是怎么实现,拿ProviderInfo举例分析:
package android.content.pm;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.PatternMatcher;
import android.util.Printer;
/**
* Holds information about a specific
* {@link android.content.ContentProvider content provider}. This is returned by
* {@link android.content.pm.PackageManager#resolveContentProvider(java.lang.String, int)
* PackageManager.resolveContentProvider()}.
*/
public final class ProviderInfo extends ComponentInfo
implements Parcelable {
/** The name provider is published under content:// */
public String authority = null;
/** Optional permission required for read-only access this content
* provider. */
public String rea