Merge "Fix issue #37324532: API Review: android.content.pm.InstrumentationInfo" into oc-dev
am: fb5840b0e6
Change-Id: Ib6855dbaec382426038855ab43d5be6d7dcb8892
This commit is contained in:
@@ -1296,7 +1296,7 @@ package android {
|
||||
field public static final int targetId = 16843740; // 0x10103dc
|
||||
field public static final int targetName = 16843853; // 0x101044d
|
||||
field public static final int targetPackage = 16842785; // 0x1010021
|
||||
field public static final int targetProcess = 16844097; // 0x1010541
|
||||
field public static final int targetProcesses = 16844097; // 0x1010541
|
||||
field public static final int targetSandboxVersion = 16844110; // 0x101054e
|
||||
field public static final int targetSdkVersion = 16843376; // 0x1010270
|
||||
field public static final int taskAffinity = 16842770; // 0x1010012
|
||||
@@ -10319,7 +10319,7 @@ package android.content.pm {
|
||||
field public java.lang.String[] splitPublicSourceDirs;
|
||||
field public java.lang.String[] splitSourceDirs;
|
||||
field public java.lang.String targetPackage;
|
||||
field public java.lang.String targetProcess;
|
||||
field public java.lang.String targetProcesses;
|
||||
}
|
||||
|
||||
public class LabeledIntent extends android.content.Intent {
|
||||
|
||||
@@ -1422,7 +1422,7 @@ package android {
|
||||
field public static final int targetId = 16843740; // 0x10103dc
|
||||
field public static final int targetName = 16843853; // 0x101044d
|
||||
field public static final int targetPackage = 16842785; // 0x1010021
|
||||
field public static final int targetProcess = 16844097; // 0x1010541
|
||||
field public static final int targetProcesses = 16844097; // 0x1010541
|
||||
field public static final int targetSandboxVersion = 16844110; // 0x101054e
|
||||
field public static final int targetSdkVersion = 16843376; // 0x1010270
|
||||
field public static final int taskAffinity = 16842770; // 0x1010012
|
||||
@@ -10980,7 +10980,7 @@ package android.content.pm {
|
||||
field public java.lang.String[] splitPublicSourceDirs;
|
||||
field public java.lang.String[] splitSourceDirs;
|
||||
field public java.lang.String targetPackage;
|
||||
field public java.lang.String targetProcess;
|
||||
field public java.lang.String targetProcesses;
|
||||
}
|
||||
|
||||
public final class IntentFilterVerificationInfo implements android.os.Parcelable {
|
||||
|
||||
@@ -1296,7 +1296,7 @@ package android {
|
||||
field public static final int targetId = 16843740; // 0x10103dc
|
||||
field public static final int targetName = 16843853; // 0x101044d
|
||||
field public static final int targetPackage = 16842785; // 0x1010021
|
||||
field public static final int targetProcess = 16844097; // 0x1010541
|
||||
field public static final int targetProcesses = 16844097; // 0x1010541
|
||||
field public static final int targetSandboxVersion = 16844110; // 0x101054e
|
||||
field public static final int targetSdkVersion = 16843376; // 0x1010270
|
||||
field public static final int taskAffinity = 16842770; // 0x1010012
|
||||
@@ -10355,7 +10355,7 @@ package android.content.pm {
|
||||
field public java.lang.String[] splitPublicSourceDirs;
|
||||
field public java.lang.String[] splitSourceDirs;
|
||||
field public java.lang.String targetPackage;
|
||||
field public java.lang.String targetProcess;
|
||||
field public java.lang.String targetProcesses;
|
||||
}
|
||||
|
||||
public class LabeledIntent extends android.content.Intent {
|
||||
|
||||
@@ -19,7 +19,6 @@ package android.content.pm;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.util.SparseArray;
|
||||
import android.util.SparseIntArray;
|
||||
|
||||
/**
|
||||
* Information you can retrieve about a particular piece of test
|
||||
@@ -38,7 +37,7 @@ public class InstrumentationInfo extends PackageItemInfo implements Parcelable {
|
||||
* runs in the main process of the targetPackage. Can either be a comma-separated list
|
||||
* of process names or '*' for any process that launches to run targetPackage code.
|
||||
*/
|
||||
public String targetProcess;
|
||||
public String targetProcesses;
|
||||
|
||||
/**
|
||||
* Full path to the base APK for this application.
|
||||
@@ -122,7 +121,7 @@ public class InstrumentationInfo extends PackageItemInfo implements Parcelable {
|
||||
public InstrumentationInfo(InstrumentationInfo orig) {
|
||||
super(orig);
|
||||
targetPackage = orig.targetPackage;
|
||||
targetProcess = orig.targetProcess;
|
||||
targetProcesses = orig.targetProcesses;
|
||||
sourceDir = orig.sourceDir;
|
||||
publicSourceDir = orig.publicSourceDir;
|
||||
splitNames = orig.splitNames;
|
||||
@@ -151,7 +150,7 @@ public class InstrumentationInfo extends PackageItemInfo implements Parcelable {
|
||||
public void writeToParcel(Parcel dest, int parcelableFlags) {
|
||||
super.writeToParcel(dest, parcelableFlags);
|
||||
dest.writeString(targetPackage);
|
||||
dest.writeString(targetProcess);
|
||||
dest.writeString(targetProcesses);
|
||||
dest.writeString(sourceDir);
|
||||
dest.writeString(publicSourceDir);
|
||||
dest.writeStringArray(splitNames);
|
||||
@@ -181,7 +180,7 @@ public class InstrumentationInfo extends PackageItemInfo implements Parcelable {
|
||||
private InstrumentationInfo(Parcel source) {
|
||||
super(source);
|
||||
targetPackage = source.readString();
|
||||
targetProcess = source.readString();
|
||||
targetProcesses = source.readString();
|
||||
sourceDir = source.readString();
|
||||
publicSourceDir = source.readString();
|
||||
splitNames = source.readStringArray();
|
||||
|
||||
@@ -3300,8 +3300,8 @@ public class PackageParser {
|
||||
a.info.targetPackage = str != null ? str.intern() : null;
|
||||
|
||||
str = sa.getNonResourceString(
|
||||
com.android.internal.R.styleable.AndroidManifestInstrumentation_targetProcess);
|
||||
a.info.targetProcess = str != null ? str.intern() : null;
|
||||
com.android.internal.R.styleable.AndroidManifestInstrumentation_targetProcesses);
|
||||
a.info.targetProcesses = str != null ? str.intern() : null;
|
||||
|
||||
a.info.handleProfiling = sa.getBoolean(
|
||||
com.android.internal.R.styleable.AndroidManifestInstrumentation_handleProfiling,
|
||||
@@ -7237,8 +7237,8 @@ public class PackageParser {
|
||||
info.targetPackage = info.targetPackage.intern();
|
||||
}
|
||||
|
||||
if (info.targetProcess != null) {
|
||||
info.targetProcess = info.targetProcess.intern();
|
||||
if (info.targetProcesses != null) {
|
||||
info.targetProcesses = info.targetProcesses.intern();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -897,7 +897,7 @@
|
||||
will run against. If not specified, only runs in the main process of the targetPackage.
|
||||
Can either be a comma-separated list of process names or '*' for any process that
|
||||
launches to run targetPackage code. -->
|
||||
<attr name="targetProcess" format="string" />
|
||||
<attr name="targetProcesses" format="string" />
|
||||
|
||||
<!-- Flag indicating that an Instrumentation class wants to take care
|
||||
of starting/stopping profiling itself, rather than relying on
|
||||
@@ -2355,7 +2355,7 @@
|
||||
is a period then it is appended to your package name. -->
|
||||
<attr name="name" />
|
||||
<attr name="targetPackage" />
|
||||
<attr name="targetProcess" />
|
||||
<attr name="targetProcesses" />
|
||||
<attr name="label" />
|
||||
<attr name="icon" />
|
||||
<attr name="roundIcon" />
|
||||
|
||||
@@ -2778,7 +2778,7 @@
|
||||
<public name="paddingVertical" />
|
||||
<public name="fontStyle" />
|
||||
<public name="keyboardNavigationCluster" />
|
||||
<public name="targetProcess" />
|
||||
<public name="targetProcesses" />
|
||||
<public name="nextClusterForward" />
|
||||
<public name="__removed1" />
|
||||
<public name="colorError" />
|
||||
|
||||
@@ -19720,12 +19720,12 @@ public class ActivityManagerService extends IActivityManager.Stub
|
||||
ActiveInstrumentation activeInstr = new ActiveInstrumentation(this);
|
||||
activeInstr.mClass = className;
|
||||
String defProcess = ai.processName;;
|
||||
if (ii.targetProcess == null) {
|
||||
if (ii.targetProcesses == null) {
|
||||
activeInstr.mTargetProcesses = new String[]{ai.processName};
|
||||
} else if (ii.targetProcess.equals("*")) {
|
||||
} else if (ii.targetProcesses.equals("*")) {
|
||||
activeInstr.mTargetProcesses = new String[0];
|
||||
} else {
|
||||
activeInstr.mTargetProcesses = ii.targetProcess.split(",");
|
||||
activeInstr.mTargetProcesses = ii.targetProcesses.split(",");
|
||||
defProcess = activeInstr.mTargetProcesses[0];
|
||||
}
|
||||
activeInstr.mTargetInfo = ai;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package com.android.server.pm;
|
||||
|
||||
import android.annotation.TestApi;
|
||||
import android.content.pm.ActivityInfo;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.ConfigurationInfo;
|
||||
@@ -338,7 +337,7 @@ public class PackageParserTest {
|
||||
|
||||
// Sanity check for InstrumentationInfo.
|
||||
assertEquals(a.info.targetPackage, b.info.targetPackage);
|
||||
assertEquals(a.info.targetProcess, b.info.targetProcess);
|
||||
assertEquals(a.info.targetProcesses, b.info.targetProcesses);
|
||||
assertEquals(a.info.sourceDir, b.info.sourceDir);
|
||||
assertEquals(a.info.publicSourceDir, b.info.publicSourceDir);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user