summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-09-11 13:56:04 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-09-11 13:56:04 -0700
commit9ba2a188919e6e5bf8c042b26527fc090de677ef (patch)
treeffe81460ca6a2f255d7cb6fe93a79fb0b081a72a /cmds
parentfaed98a161f58441ebce3dcb08cd8bf76a76da4e (diff)
parent59c53c6224e2f84d31a56854ebe90d22055100d2 (diff)
downloadframeworks_base-9ba2a188919e6e5bf8c042b26527fc090de677ef.zip
frameworks_base-9ba2a188919e6e5bf8c042b26527fc090de677ef.tar.gz
frameworks_base-9ba2a188919e6e5bf8c042b26527fc090de677ef.tar.bz2
Merge changes I4ad08873,If0562677,I5fe6ba32 into jb-mr1-dev
* changes: Don't auto-discover peers until scan requested. Use wfdInfo to filter available sinks. Allow adb shell am display-size to use bigger sizes.
Diffstat (limited to 'cmds')
-rw-r--r--cmds/am/src/com/android/commands/am/Am.java24
1 files changed, 9 insertions, 15 deletions
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java
index 89287ad..bc9e74e 100644
--- a/cmds/am/src/com/android/commands/am/Am.java
+++ b/cmds/am/src/com/android/commands/am/Am.java
@@ -1187,32 +1187,26 @@ public class Am {
private void runDisplaySize() throws Exception {
String size = nextArgRequired();
- int m, n;
+ int w, h;
if ("reset".equals(size)) {
- m = n = -1;
+ w = h = -1;
} else {
int div = size.indexOf('x');
if (div <= 0 || div >= (size.length()-1)) {
System.err.println("Error: bad size " + size);
return;
}
- String mstr = size.substring(0, div);
- String nstr = size.substring(div+1);
+ String wstr = size.substring(0, div);
+ String hstr = size.substring(div+1);
try {
- m = Integer.parseInt(mstr);
- n = Integer.parseInt(nstr);
+ w = Integer.parseInt(wstr);
+ h = Integer.parseInt(hstr);
} catch (NumberFormatException e) {
System.err.println("Error: bad number " + e);
return;
}
}
- if (m < n) {
- int tmp = m;
- m = n;
- n = tmp;
- }
-
IWindowManager wm = IWindowManager.Stub.asInterface(ServiceManager.checkService(
Context.WINDOW_SERVICE));
if (wm == null) {
@@ -1221,9 +1215,9 @@ public class Am {
}
try {
- if (m >= 0 && n >= 0) {
+ if (w >= 0 && h >= 0) {
// TODO(multidisplay): For now Configuration only applies to main screen.
- wm.setForcedDisplaySize(Display.DEFAULT_DISPLAY, m, n);
+ wm.setForcedDisplaySize(Display.DEFAULT_DISPLAY, w, h);
} else {
wm.clearForcedDisplaySize(Display.DEFAULT_DISPLAY);
}
@@ -1444,7 +1438,7 @@ public class Am {
" am clear-debug-app\n" +
" am monitor [--gdb <port>]\n" +
" am screen-compat [on|off] <PACKAGE>\n" +
- " am display-size [reset|MxN]\n" +
+ " am display-size [reset|WxH]\n" +
" am display-density [reset|DENSITY]\n" +
" am to-uri [INTENT]\n" +
" am to-intent-uri [INTENT]\n" +