diff options
author | Adam Powell <adamp@google.com> | 2010-08-04 15:26:22 -0700 |
---|---|---|
committer | Adam Powell <adamp@google.com> | 2010-08-04 17:42:44 -0700 |
commit | 8e552630e72a17d7340f1bebccbc6fd6faef82fb (patch) | |
tree | e09d78648831b4fbef5fb545650411811b3da176 /policy | |
parent | 2cd1dbe50dc2acbabb1cbd5b7e31563f63797106 (diff) | |
download | frameworks_base-8e552630e72a17d7340f1bebccbc6fd6faef82fb.zip frameworks_base-8e552630e72a17d7340f1bebccbc6fd6faef82fb.tar.gz frameworks_base-8e552630e72a17d7340f1bebccbc6fd6faef82fb.tar.bz2 |
Let action modes overlay window content
Change-Id: Ic0512c3e6338e1de15facec0a6650f9da9808a24
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindow.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java index 458ac9d..2299852 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java @@ -71,6 +71,7 @@ import android.view.SurfaceHolder; import android.view.View; import android.view.ViewGroup; import android.view.ViewManager; +import android.view.ViewStub; import android.view.VolumePanel; import android.view.Window; import android.view.WindowManager; @@ -1949,8 +1950,16 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { mActionMode = mode; } else { if (mActionModeView == null) { - mActionModeView = (ActionBarContextView) findViewById( - com.android.internal.R.id.action_mode_bar); + if (hasFeature(FEATURE_ACTION_MODE_OVERLAY)) { + mActionModeView = new ActionBarContextView(mContext); + FrameLayout.LayoutParams params = new FrameLayout.LayoutParams( + MATCH_PARENT, WRAP_CONTENT); + addView(mActionModeView, params); + } else { + ViewStub stub = (ViewStub) findViewById( + com.android.internal.R.id.action_mode_bar_stub); + mActionModeView = (ActionBarContextView) stub.inflate(); + } } if (mActionModeView != null) { |