summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2015-05-11 16:11:13 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-11 16:11:14 +0000
commita5b2684c25add3ba6ebc43c27a1abc6bce2b2af4 (patch)
treedc704504bae79612fc08ddbfe58db1ac9bf06e62 /cmds
parentc454f786e2301b26afee3809a293a7fadd65434a (diff)
parente5f330456bdf5e138485ee117929fc4337866132 (diff)
downloadframeworks_base-a5b2684c25add3ba6ebc43c27a1abc6bce2b2af4.zip
frameworks_base-a5b2684c25add3ba6ebc43c27a1abc6bce2b2af4.tar.gz
frameworks_base-a5b2684c25add3ba6ebc43c27a1abc6bce2b2af4.tar.bz2
Merge "Rename *AppIdle to *AppInactive per api-council" into mnc-dev
Diffstat (limited to 'cmds')
-rw-r--r--cmds/am/src/com/android/commands/am/Am.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java
index 219d35b..808e124 100644
--- a/cmds/am/src/com/android/commands/am/Am.java
+++ b/cmds/am/src/com/android/commands/am/Am.java
@@ -142,8 +142,8 @@ public class Am extends BaseCommand {
" am task resizeable <TASK_ID> [true|false]\n" +
" am task resize <TASK_ID> <LEFT,TOP,RIGHT,BOTTOM>\n" +
" am get-config\n" +
- " am set-idle [--user <USER_ID>] <PACKAGE> true|false\n" +
- " am get-idle [--user <USER_ID>] <PACKAGE>\n" +
+ " am set-inactive [--user <USER_ID>] <PACKAGE> true|false\n" +
+ " am get-inactive [--user <USER_ID>] <PACKAGE>\n" +
"\n" +
"am start: start an Activity. Options are:\n" +
" -D: enable debugging\n" +
@@ -284,9 +284,9 @@ public class Am extends BaseCommand {
"am get-config: retrieve the configuration and any recent configurations\n" +
" of the device\n" +
"\n" +
- "am set-idle: sets the idle state of an app\n" +
+ "am set-inactive: sets the inactive state of an app\n" +
"\n" +
- "am get-idle: returns the idle state of an app\n" +
+ "am get-inactive: returns the inactive state of an app\n" +
"\n" +
"\n" +
"<INTENT> specifications include these flags and arguments:\n" +
@@ -395,10 +395,10 @@ public class Am extends BaseCommand {
runTask();
} else if (op.equals("get-config")) {
runGetConfig();
- } else if (op.equals("set-idle")) {
- runSetIdle();
- } else if (op.equals("get-idle")) {
- runGetIdle();
+ } else if (op.equals("set-inactive")) {
+ runSetInactive();
+ } else if (op.equals("get-inactive")) {
+ runGetInactive();
} else {
showError("Error: unknown command '" + op + "'");
}
@@ -2030,7 +2030,7 @@ public class Am extends BaseCommand {
}
}
- private void runSetIdle() throws Exception {
+ private void runSetInactive() throws Exception {
int userId = UserHandle.USER_OWNER;
String opt;
@@ -2047,10 +2047,10 @@ public class Am extends BaseCommand {
IUsageStatsManager usm = IUsageStatsManager.Stub.asInterface(ServiceManager.getService(
Context.USAGE_STATS_SERVICE));
- usm.setAppIdle(packageName, Boolean.parseBoolean(value), userId);
+ usm.setAppInactive(packageName, Boolean.parseBoolean(value), userId);
}
- private void runGetIdle() throws Exception {
+ private void runGetInactive() throws Exception {
int userId = UserHandle.USER_OWNER;
String opt;
@@ -2066,7 +2066,7 @@ public class Am extends BaseCommand {
IUsageStatsManager usm = IUsageStatsManager.Stub.asInterface(ServiceManager.getService(
Context.USAGE_STATS_SERVICE));
- boolean isIdle = usm.isAppIdle(packageName, userId);
+ boolean isIdle = usm.isAppInactive(packageName, userId);
System.out.println("Idle=" + isIdle);
}