diff options
author | Deepanshu Gupta <deepanshu@google.com> | 2014-05-13 02:20:58 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-05-13 02:20:58 +0000 |
commit | 7377c7be6abcb3bccabb6cdf2af0ecfed355606c (patch) | |
tree | d1aa739fb16c96e059784687f77733b09ed381f5 /tools | |
parent | 9359dc2e7d6bc671af3fee0c1dc540dd3685365c (diff) | |
parent | 3a115628236ee9051518d4f96840cbb76070cf92 (diff) | |
download | frameworks_base-7377c7be6abcb3bccabb6cdf2af0ecfed355606c.zip frameworks_base-7377c7be6abcb3bccabb6cdf2af0ecfed355606c.tar.gz frameworks_base-7377c7be6abcb3bccabb6cdf2af0ecfed355606c.tar.bz2 |
am 3a115628: Add Navigation Bar to BridgeWindowManager [DO NOT MERGE]
* commit '3a115628236ee9051518d4f96840cbb76070cf92':
Add Navigation Bar to BridgeWindowManager [DO NOT MERGE]
Diffstat (limited to 'tools')
-rw-r--r-- | tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindowManager.java | 12 | ||||
-rw-r--r-- | tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindowManager.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindowManager.java index 8ab875f..6f41f90 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindowManager.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeWindowManager.java @@ -35,11 +35,6 @@ import android.view.IOnKeyguardExitResult; import android.view.IRotationWatcher; import android.view.IWindowManager; import android.view.IWindowSession; -import android.view.InputChannel; -import android.view.InputDevice; -import android.view.InputEvent; -import android.view.KeyEvent; -import android.view.MotionEvent; import java.util.List; @@ -52,6 +47,7 @@ public class BridgeWindowManager implements IWindowManager { private final Configuration mConfig; private final DisplayMetrics mMetrics; private final int mRotation; + private boolean mHasNavBar; public BridgeWindowManager(Configuration config, DisplayMetrics metrics, int rotation) { mConfig = config; @@ -64,6 +60,10 @@ public class BridgeWindowManager implements IWindowManager { public DisplayMetrics getMetrics() { return mMetrics; } + + public void setHasNavBar(boolean hasNavBar) { + mHasNavBar = hasNavBar; + } // ---- implementation of IWindowManager that we care about ---- @@ -448,7 +448,7 @@ public class BridgeWindowManager implements IWindowManager { @Override public boolean hasNavigationBar() { - return false; // should this return something else? + return mHasNavBar; } @Override diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java index 03e7132..1d1c73f 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java @@ -182,6 +182,8 @@ public class RenderSessionImpl extends RenderAction<SessionParams> { SessionParams params = getParams(); BridgeContext context = getContext(); + context.getIWindowManager().setHasNavBar(params.getHardwareConfig().hasSoftwareButtons()); + RenderResources resources = getParams().getResources(); DisplayMetrics metrics = getContext().getMetrics(); |