summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorTim Kilbourn <tkilbourn@google.com>2014-05-30 17:09:12 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-30 17:09:12 +0000
commit1d285b091bef26cec7e9bedc60f6b549608dc9a0 (patch)
tree72868fc8545f25a505a2475d4443ded7d249dec2 /policy
parent8407968db68f1838663118fd0b23576854b8c525 (diff)
parentd7c0c2ee45dd5367ac7863517de2e385fbd424f3 (diff)
downloadframeworks_base-1d285b091bef26cec7e9bedc60f6b549608dc9a0.zip
frameworks_base-1d285b091bef26cec7e9bedc60f6b549608dc9a0.tar.gz
frameworks_base-1d285b091bef26cec7e9bedc60f6b549608dc9a0.tar.bz2
Merge "Add global key mappings to dump output." into lmp-preview-dev
Diffstat (limited to 'policy')
-rw-r--r--policy/src/com/android/internal/policy/impl/GlobalKeyManager.java18
-rw-r--r--policy/src/com/android/internal/policy/impl/PhoneWindowManager.java1
2 files changed, 19 insertions, 0 deletions
diff --git a/policy/src/com/android/internal/policy/impl/GlobalKeyManager.java b/policy/src/com/android/internal/policy/impl/GlobalKeyManager.java
index 3cf7e82..8c8209f 100644
--- a/policy/src/com/android/internal/policy/impl/GlobalKeyManager.java
+++ b/policy/src/com/android/internal/policy/impl/GlobalKeyManager.java
@@ -30,6 +30,7 @@ import com.android.internal.util.XmlUtils;
import org.xmlpull.v1.XmlPullParserException;
import java.io.IOException;
+import java.io.PrintWriter;
/**
* Stores a mapping of global keys.
@@ -123,4 +124,21 @@ final class GlobalKeyManager {
}
}
}
+
+ public void dump(String prefix, PrintWriter pw) {
+ final int numKeys = mKeyMapping.size();
+ if (numKeys == 0) {
+ pw.print(prefix); pw.println("mKeyMapping.size=0");
+ return;
+ }
+ pw.print(prefix); pw.println("mKeyMapping={");
+ for (int i = 0; i < numKeys; ++i) {
+ pw.print(" ");
+ pw.print(prefix);
+ pw.print(KeyEvent.keyCodeToString(mKeyMapping.keyAt(i)));
+ pw.print("=");
+ pw.println(mKeyMapping.valueAt(i).flattenToString());
+ }
+ pw.print(prefix); pw.println("}");
+ }
}
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 8e68dfc..1aca89a 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -5623,6 +5623,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
pw.print(prefix); pw.print("mDemoHdmiRotation="); pw.print(mDemoHdmiRotation);
pw.print(" mDemoHdmiRotationLock="); pw.println(mDemoHdmiRotationLock);
pw.print(prefix); pw.print("mUndockedHdmiRotation="); pw.println(mUndockedHdmiRotation);
+ mGlobalKeyManager.dump(prefix, pw);
mStatusBarController.dump(pw, prefix);
mNavigationBarController.dump(pw, prefix);
PolicyControl.dump(prefix, pw);