summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yohei Yukawa <yukawa@google.com> 2017-08-31 00:26:01 -0700
committer Yohei Yukawa <yukawa@google.com> 2017-08-31 15:24:48 +0000
commit8f272178a00b9e5f1da7ec4e9898f50f850ed275 (patch)
tree7155847118ae7d22c8340746f60c5a98f5d14ea8
parent8d1a86ca0f0c2aa10928e47a1bcc6bfab7e741ba (diff)
Fix wrong dump output of *Info#flags
This CL follows up to a previous CL [1] that introduced an ability to control filtering level of - ActivityInfo#dump() - ApplicationInfo#dump() - ComponentInfo#dump() - ProviderInfo#dump() - ResolveInfo#dump() - ServiceInfo#dump() but also masked following outputs as an unexpected side effect. - ActivityInfo#flags - ApplicationInfo#flags - ProviderInfo#flags - ServiceInfo#flags With this CL, above *Info#flags are correctly dumped again. [1]: I0d01565babb87e68b840c9756a2ea730d699efc7 6ac42aeed905181b484f97a53db57a17134ef7a8 Test: Manually tested as follows. 1. make -j SoftKeyboard 2. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk 3. adb shell dumpsys input_method -> Check 'com.example.android.softkeyboard' section -> make sure ServiceInfo#flags=0x0 -> make sure ApplicationInfo#flags=0x38a8be44 FLAG_HAS_CODE (1<<2) FLAG_ALLOW_CLEAR_USER_DATA (1<<6) FLAG_SUPPORTS_SMALL_SCREENS (1<<9) FLAG_SUPPORTS_NORMAL_SCREENS (1<<10) FLAG_SUPPORTS_LARGE_SCREENS (1<<11) FLAG_RESIZEABLE_FOR_SCREENS (1<<12) FLAG_SUPPORTS_SCREEN_DENSITIES (1<<13) FLAG_ALLOW_BACKUP (1<<15) FLAG_SUPPORTS_XLARGE_SCREENS (1<<19) FLAG_STOPPED (1<<21) FLAG_SUPPORTS_RTL (1<<22) FLAG_INSTALLED (1<<23) FLAG_FULL_BACKUP_ONLY (1<<26) FLAG_EXTRACT_NATIVE_LIBS (1<<28) FLAG_HARDWARE_ACCELERATED (1<<29) Fixes: 65057767 Change-Id: Icd1e18237e873844791ccdea7f424b6fe76137c0
-rw-r--r--core/java/android/content/pm/ActivityInfo.java8
-rw-r--r--core/java/android/content/pm/ApplicationInfo.java14
-rw-r--r--core/java/android/content/pm/ComponentInfo.java8
-rw-r--r--core/java/android/content/pm/ProviderInfo.java4
-rw-r--r--core/java/android/content/pm/ResolveInfo.java8
-rw-r--r--core/java/android/content/pm/ServiceInfo.java6
6 files changed, 24 insertions, 24 deletions
diff --git a/core/java/android/content/pm/ActivityInfo.java b/core/java/android/content/pm/ActivityInfo.java
index ca5fa6be1323..93338bb5b025 100644
--- a/core/java/android/content/pm/ActivityInfo.java
+++ b/core/java/android/content/pm/ActivityInfo.java
@@ -1096,12 +1096,12 @@ public class ActivityInfo extends ComponentInfo
}
/** @hide */
- public void dump(Printer pw, String prefix, int flags) {
+ public void dump(Printer pw, String prefix, int dumpFlags) {
super.dumpFront(pw, prefix);
if (permission != null) {
pw.println(prefix + "permission=" + permission);
}
- if ((flags&DUMP_FLAG_DETAILS) != 0) {
+ if ((dumpFlags & DUMP_FLAG_DETAILS) != 0) {
pw.println(prefix + "taskAffinity=" + taskAffinity
+ " targetActivity=" + targetActivity
+ " persistableMode=" + persistableModeToString());
@@ -1120,7 +1120,7 @@ public class ActivityInfo extends ComponentInfo
if (uiOptions != 0) {
pw.println(prefix + " uiOptions=0x" + Integer.toHexString(uiOptions));
}
- if ((flags&DUMP_FLAG_DETAILS) != 0) {
+ if ((dumpFlags & DUMP_FLAG_DETAILS) != 0) {
pw.println(prefix + "lockTaskLaunchMode="
+ lockTaskLaunchModeToString(lockTaskLaunchMode));
}
@@ -1136,7 +1136,7 @@ public class ActivityInfo extends ComponentInfo
if (maxAspectRatio != 0) {
pw.println(prefix + "maxAspectRatio=" + maxAspectRatio);
}
- super.dumpBack(pw, prefix, flags);
+ super.dumpBack(pw, prefix, dumpFlags);
}
public String toString() {
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java
index 2aa3d09dd479..ad7a5ab10e41 100644
--- a/core/java/android/content/pm/ApplicationInfo.java
+++ b/core/java/android/content/pm/ApplicationInfo.java
@@ -1046,22 +1046,22 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
}
/** @hide */
- public void dump(Printer pw, String prefix, int flags) {
+ public void dump(Printer pw, String prefix, int dumpFlags) {
super.dumpFront(pw, prefix);
- if ((flags&DUMP_FLAG_DETAILS) != 0 && className != null) {
+ if ((dumpFlags & DUMP_FLAG_DETAILS) != 0 && className != null) {
pw.println(prefix + "className=" + className);
}
if (permission != null) {
pw.println(prefix + "permission=" + permission);
}
pw.println(prefix + "processName=" + processName);
- if ((flags&DUMP_FLAG_DETAILS) != 0) {
+ if ((dumpFlags & DUMP_FLAG_DETAILS) != 0) {
pw.println(prefix + "taskAffinity=" + taskAffinity);
}
pw.println(prefix + "uid=" + uid + " flags=0x" + Integer.toHexString(flags)
+ " privateFlags=0x" + Integer.toHexString(privateFlags)
+ " theme=0x" + Integer.toHexString(theme));
- if ((flags&DUMP_FLAG_DETAILS) != 0) {
+ if ((dumpFlags & DUMP_FLAG_DETAILS) != 0) {
pw.println(prefix + "requiresSmallestWidthDp=" + requiresSmallestWidthDp
+ " compatibleWidthLimitDp=" + compatibleWidthLimitDp
+ " largestWidthLimitDp=" + largestWidthLimitDp);
@@ -1080,12 +1080,12 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
if (resourceDirs != null) {
pw.println(prefix + "resourceDirs=" + Arrays.toString(resourceDirs));
}
- if ((flags&DUMP_FLAG_DETAILS) != 0 && seInfo != null) {
+ if ((dumpFlags & DUMP_FLAG_DETAILS) != 0 && seInfo != null) {
pw.println(prefix + "seinfo=" + seInfo);
pw.println(prefix + "seinfoUser=" + seInfoUser);
}
pw.println(prefix + "dataDir=" + dataDir);
- if ((flags&DUMP_FLAG_DETAILS) != 0) {
+ if ((dumpFlags & DUMP_FLAG_DETAILS) != 0) {
pw.println(prefix + "deviceProtectedDataDir=" + deviceProtectedDataDir);
pw.println(prefix + "credentialProtectedDataDir=" + credentialProtectedDataDir);
if (sharedLibraryFiles != null) {
@@ -1104,7 +1104,7 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
+ " targetSdkVersion=" + targetSdkVersion
+ " versionCode=" + versionCode
+ " targetSandboxVersion=" + targetSandboxVersion);
- if ((flags&DUMP_FLAG_DETAILS) != 0) {
+ if ((dumpFlags & DUMP_FLAG_DETAILS) != 0) {
if (manageSpaceActivityName != null) {
pw.println(prefix + "manageSpaceActivityName=" + manageSpaceActivityName);
}
diff --git a/core/java/android/content/pm/ComponentInfo.java b/core/java/android/content/pm/ComponentInfo.java
index 53be9537d00d..6b1222f53959 100644
--- a/core/java/android/content/pm/ComponentInfo.java
+++ b/core/java/android/content/pm/ComponentInfo.java
@@ -183,12 +183,12 @@ public class ComponentInfo extends PackageItemInfo {
protected void dumpBack(Printer pw, String prefix) {
dumpBack(pw, prefix, DUMP_FLAG_ALL);
}
-
- void dumpBack(Printer pw, String prefix, int flags) {
- if ((flags&DUMP_FLAG_APPLICATION) != 0) {
+
+ void dumpBack(Printer pw, String prefix, int dumpFlags) {
+ if ((dumpFlags & DUMP_FLAG_APPLICATION) != 0) {
if (applicationInfo != null) {
pw.println(prefix + "ApplicationInfo:");
- applicationInfo.dump(pw, prefix + " ", flags);
+ applicationInfo.dump(pw, prefix + " ", dumpFlags);
} else {
pw.println(prefix + "ApplicationInfo: null");
}
diff --git a/core/java/android/content/pm/ProviderInfo.java b/core/java/android/content/pm/ProviderInfo.java
index 91dc06e12138..379b7833150c 100644
--- a/core/java/android/content/pm/ProviderInfo.java
+++ b/core/java/android/content/pm/ProviderInfo.java
@@ -125,11 +125,11 @@ public final class ProviderInfo extends ComponentInfo
}
/** @hide */
- public void dump(Printer pw, String prefix, int flags) {
+ public void dump(Printer pw, String prefix, int dumpFlags) {
super.dumpFront(pw, prefix);
pw.println(prefix + "authority=" + authority);
pw.println(prefix + "flags=0x" + Integer.toHexString(flags));
- super.dumpBack(pw, prefix, flags);
+ super.dumpBack(pw, prefix, dumpFlags);
}
public int describeContents() {
diff --git a/core/java/android/content/pm/ResolveInfo.java b/core/java/android/content/pm/ResolveInfo.java
index f312204e9467..799316700b4d 100644
--- a/core/java/android/content/pm/ResolveInfo.java
+++ b/core/java/android/content/pm/ResolveInfo.java
@@ -282,7 +282,7 @@ public class ResolveInfo implements Parcelable {
}
/** @hide */
- public void dump(Printer pw, String prefix, int flags) {
+ public void dump(Printer pw, String prefix, int dumpFlags) {
if (filter != null) {
pw.println(prefix + "Filter:");
filter.dump(pw, prefix + " ");
@@ -302,13 +302,13 @@ public class ResolveInfo implements Parcelable {
}
if (activityInfo != null) {
pw.println(prefix + "ActivityInfo:");
- activityInfo.dump(pw, prefix + " ", flags);
+ activityInfo.dump(pw, prefix + " ", dumpFlags);
} else if (serviceInfo != null) {
pw.println(prefix + "ServiceInfo:");
- serviceInfo.dump(pw, prefix + " ", flags);
+ serviceInfo.dump(pw, prefix + " ", dumpFlags);
} else if (providerInfo != null) {
pw.println(prefix + "ProviderInfo:");
- providerInfo.dump(pw, prefix + " ", flags);
+ providerInfo.dump(pw, prefix + " ", dumpFlags);
}
}
diff --git a/core/java/android/content/pm/ServiceInfo.java b/core/java/android/content/pm/ServiceInfo.java
index c683ea5d9739..91f884ccd3dc 100644
--- a/core/java/android/content/pm/ServiceInfo.java
+++ b/core/java/android/content/pm/ServiceInfo.java
@@ -91,13 +91,13 @@ public class ServiceInfo extends ComponentInfo
}
/** @hide */
- void dump(Printer pw, String prefix, int flags) {
+ void dump(Printer pw, String prefix, int dumpFlags) {
super.dumpFront(pw, prefix);
pw.println(prefix + "permission=" + permission);
pw.println(prefix + "flags=0x" + Integer.toHexString(flags));
- super.dumpBack(pw, prefix, flags);
+ super.dumpBack(pw, prefix, dumpFlags);
}
-
+
public String toString() {
return "ServiceInfo{"
+ Integer.toHexString(System.identityHashCode(this))