summaryrefslogtreecommitdiffstats
path: root/cmds/pm
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-05-12 15:39:41 -0700
committerDianne Hackborn <hackbod@google.com>2011-05-12 15:39:41 -0700
commit3d0724dc220a2e027b9e38f61c39c84c28a505d5 (patch)
treed0bb402a46c3de05da7f086c629b78c3b175b3ba /cmds/pm
parent674b595fa5299d138e068b2b786027d6d6225394 (diff)
parent0e59729b104e48c7d935026f565c4b45f1f37d12 (diff)
downloadframeworks_base-3d0724dc220a2e027b9e38f61c39c84c28a505d5.zip
frameworks_base-3d0724dc220a2e027b9e38f61c39c84c28a505d5.tar.gz
frameworks_base-3d0724dc220a2e027b9e38f61c39c84c28a505d5.tar.bz2
resolved conflicts for merge of 0e59729b to master
Change-Id: I2d3a6bddf66b1df0c101c45ea2fec1cf65caf01b
Diffstat (limited to 'cmds/pm')
-rw-r--r--cmds/pm/src/com/android/commands/pm/Pm.java19
1 files changed, 15 insertions, 4 deletions
diff --git a/cmds/pm/src/com/android/commands/pm/Pm.java b/cmds/pm/src/com/android/commands/pm/Pm.java
index 78a450c..701c7ac 100644
--- a/cmds/pm/src/com/android/commands/pm/Pm.java
+++ b/cmds/pm/src/com/android/commands/pm/Pm.java
@@ -204,6 +204,7 @@ public final class Pm {
private void runListPackages(boolean showApplicationPackage) {
int getFlags = 0;
boolean listDisabled = false, listEnabled = false;
+ boolean listSystem = false, listThirdParty = false;
try {
String opt;
while ((opt=nextOption()) != null) {
@@ -217,6 +218,10 @@ public final class Pm {
listDisabled = true;
} else if (opt.equals("-e")) {
listEnabled = true;
+ } else if (opt.equals("-s")) {
+ listSystem = true;
+ } else if (opt.equals("-3")) {
+ listThirdParty = true;
} else if (opt.equals("-u")) {
getFlags |= PackageManager.GET_UNINSTALLED_PACKAGES;
} else {
@@ -242,8 +247,12 @@ public final class Pm {
if (filter != null && !info.packageName.contains(filter)) {
continue;
}
+ final boolean isSystem =
+ (info.applicationInfo.flags&ApplicationInfo.FLAG_SYSTEM) != 0;
if ((!listDisabled || !info.applicationInfo.enabled) &&
- (!listEnabled || info.applicationInfo.enabled)) {
+ (!listEnabled || info.applicationInfo.enabled) &&
+ (!listSystem || isSystem) &&
+ (!listThirdParty || !isSystem)) {
System.out.print("package:");
if (showApplicationPackage) {
System.out.print(info.applicationInfo.sourceDir);
@@ -1061,7 +1070,7 @@ public final class Pm {
private static void showUsage() {
System.err.println("usage: pm [list|path|install|uninstall]");
- System.err.println(" pm list packages [-f] [-d] [-e] [-u] [FILTER]");
+ System.err.println(" pm list packages [-f] [-d] [-e] [-s] [-e] [-u] [FILTER]");
System.err.println(" pm list permission-groups");
System.err.println(" pm list permissions [-g] [-f] [-d] [-u] [GROUP]");
System.err.println(" pm list instrumentation [-f] [TARGET-PACKAGE]");
@@ -1080,8 +1089,10 @@ public final class Pm {
System.err.println("The list packages command prints all packages, optionally only");
System.err.println("those whose package name contains the text in FILTER. Options:");
System.err.println(" -f: see their associated file.");
- System.err.println(" -d: filter to include disbled packages.");
- System.err.println(" -e: filter to include enabled packages.");
+ System.err.println(" -d: filter to only show disbled packages.");
+ System.err.println(" -e: filter to only show enabled packages.");
+ System.err.println(" -s: filter to only show system packages.");
+ System.err.println(" -3: filter to only show third party packages.");
System.err.println(" -u: also include uninstalled packages.");
System.err.println("");
System.err.println("The list permission-groups command prints all known");