diff options
author | Jim Miller <jaggies@google.com> | 2012-04-24 18:32:37 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-04-24 18:32:37 -0700 |
commit | e4cd3b0d9529a1ef8d388ece83a101227e206cc3 (patch) | |
tree | f32f5b5c2d8efdd2dca343ec704fb986363f02dd /core | |
parent | 97c03cac4d9a73b75096e1fa1d8927263dce39e1 (diff) | |
parent | e898ac59db04d8ab0762180ca8ec7cea1347aa09 (diff) | |
download | frameworks_base-e4cd3b0d9529a1ef8d388ece83a101227e206cc3.zip frameworks_base-e4cd3b0d9529a1ef8d388ece83a101227e206cc3.tar.gz frameworks_base-e4cd3b0d9529a1ef8d388ece83a101227e206cc3.tar.bz2 |
Merge "Fix 6299832: Add search target swipe action to navigation bar on phones"
Diffstat (limited to 'core')
15 files changed, 14 insertions, 5 deletions
diff --git a/core/java/android/view/WindowManager.java b/core/java/android/view/WindowManager.java index bc310b0..d62f513 100644 --- a/core/java/android/view/WindowManager.java +++ b/core/java/android/view/WindowManager.java @@ -429,6 +429,12 @@ public interface WindowManager extends ViewManager { public static final int TYPE_DREAM = FIRST_SYSTEM_WINDOW+23; /** + * Window type: Navigation bar panel (when navigation bar is distinct from status bar) + * @hide + */ + public static final int TYPE_NAVIGATION_BAR_PANEL = FIRST_SYSTEM_WINDOW+24; + + /** * End of types of system windows. */ public static final int LAST_SYSTEM_WINDOW = 2999; diff --git a/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java b/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java index f2b6e45..624dea8 100644 --- a/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java +++ b/core/java/com/android/internal/widget/multiwaveview/MultiWaveView.java @@ -27,7 +27,6 @@ import android.content.res.Resources; import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.RectF; -import android.graphics.drawable.Drawable; import android.os.Vibrator; import android.text.TextUtils; import android.util.AttributeSet; @@ -142,6 +141,7 @@ public class MultiWaveView extends View { private int mTargetResourceId; private int mTargetDescriptionsResourceId; private int mDirectionDescriptionsResourceId; + private boolean mAlwaysTrackFinger; public MultiWaveView(Context context) { this(context, null); @@ -168,6 +168,7 @@ public class MultiWaveView extends View { mTapRadius = mHandleDrawable.getWidth()/2; mOuterRing = new TargetDrawable(res, a.peekValue(R.styleable.MultiWaveView_waveDrawable).resourceId); + mAlwaysTrackFinger = a.getBoolean(R.styleable.MultiWaveView_alwaysTrackFinger, false); // Read chevron animation drawables final int chevrons[] = { R.styleable.MultiWaveView_leftChevronDrawable, @@ -634,7 +635,6 @@ public class MultiWaveView extends View { @Override public boolean onTouchEvent(MotionEvent event) { final int action = event.getAction(); - boolean handled = false; switch (action) { case MotionEvent.ACTION_DOWN: @@ -805,7 +805,7 @@ public class MultiWaveView extends View { final float y = event.getY(); final float dx = x - mWaveCenterX; final float dy = y - mWaveCenterY; - if (dist2(dx,dy) <= getScaledTapRadiusSquared()) { + if (mAlwaysTrackFinger || dist2(dx,dy) <= getScaledTapRadiusSquared()) { if (DEBUG) Log.v(TAG, "** Handle HIT"); switchToState(STATE_FIRST_TOUCH, x, y); moveHandleTo(x, y, false); diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_google_activated.png b/core/res/res/drawable-hdpi/ic_lockscreen_google_activated.png Binary files differnew file mode 100644 index 0000000..2c4847c --- /dev/null +++ b/core/res/res/drawable-hdpi/ic_lockscreen_google_activated.png diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_google_focused.png b/core/res/res/drawable-hdpi/ic_lockscreen_google_focused.png Binary files differnew file mode 100644 index 0000000..d98557d --- /dev/null +++ b/core/res/res/drawable-hdpi/ic_lockscreen_google_focused.png diff --git a/core/res/res/drawable-hdpi/ic_lockscreen_google_normal.png b/core/res/res/drawable-hdpi/ic_lockscreen_google_normal.png Binary files differnew file mode 100644 index 0000000..656f3ba --- /dev/null +++ b/core/res/res/drawable-hdpi/ic_lockscreen_google_normal.png diff --git a/core/res/res/drawable-mdpi/ic_lockscreen_google_activated.png b/core/res/res/drawable-mdpi/ic_lockscreen_google_activated.png Binary files differnew file mode 100644 index 0000000..32a68e0 --- /dev/null +++ b/core/res/res/drawable-mdpi/ic_lockscreen_google_activated.png diff --git a/core/res/res/drawable-mdpi/ic_lockscreen_google_focused.png b/core/res/res/drawable-mdpi/ic_lockscreen_google_focused.png Binary files differnew file mode 100644 index 0000000..3f96d03 --- /dev/null +++ b/core/res/res/drawable-mdpi/ic_lockscreen_google_focused.png diff --git a/core/res/res/drawable-mdpi/ic_lockscreen_google_normal.png b/core/res/res/drawable-mdpi/ic_lockscreen_google_normal.png Binary files differnew file mode 100644 index 0000000..2f7efcf --- /dev/null +++ b/core/res/res/drawable-mdpi/ic_lockscreen_google_normal.png diff --git a/core/res/res/drawable-xhdpi/ic_lockscreen_google_activated.png b/core/res/res/drawable-xhdpi/ic_lockscreen_google_activated.png Binary files differnew file mode 100644 index 0000000..d643f83 --- /dev/null +++ b/core/res/res/drawable-xhdpi/ic_lockscreen_google_activated.png diff --git a/core/res/res/drawable-xhdpi/ic_lockscreen_google_focused.png b/core/res/res/drawable-xhdpi/ic_lockscreen_google_focused.png Binary files differnew file mode 100644 index 0000000..51863f4 --- /dev/null +++ b/core/res/res/drawable-xhdpi/ic_lockscreen_google_focused.png diff --git a/core/res/res/drawable-xhdpi/ic_lockscreen_google_normal.png b/core/res/res/drawable-xhdpi/ic_lockscreen_google_normal.png Binary files differnew file mode 100644 index 0000000..9a9bf68 --- /dev/null +++ b/core/res/res/drawable-xhdpi/ic_lockscreen_google_normal.png diff --git a/core/res/res/drawable-xhdpi/ic_lockscreen_search_activated.png b/core/res/res/drawable-xhdpi/ic_lockscreen_search_activated.png Binary files differdeleted file mode 100644 index c625a36..0000000 --- a/core/res/res/drawable-xhdpi/ic_lockscreen_search_activated.png +++ /dev/null diff --git a/core/res/res/drawable-xhdpi/ic_lockscreen_search_normal.png b/core/res/res/drawable-xhdpi/ic_lockscreen_search_normal.png Binary files differdeleted file mode 100644 index c625a36..0000000 --- a/core/res/res/drawable-xhdpi/ic_lockscreen_search_normal.png +++ /dev/null diff --git a/core/res/res/drawable/ic_lockscreen_search.xml b/core/res/res/drawable/ic_lockscreen_search.xml index b103922..2c0091a 100644 --- a/core/res/res/drawable/ic_lockscreen_search.xml +++ b/core/res/res/drawable/ic_lockscreen_search.xml @@ -19,12 +19,12 @@ android:state_enabled="true" android:state_active="false" android:state_focused="false" - android:drawable="@drawable/ic_lockscreen_search_normal" /> + android:drawable="@drawable/ic_lockscreen_google_normal" /> <item android:state_enabled="true" android:state_active="true" android:state_focused="false" - android:drawable="@drawable/ic_lockscreen_search_activated" /> + android:drawable="@drawable/ic_lockscreen_google_activated" /> </selector> diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index 0ac381d..9fa666e 100755 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -5383,6 +5383,9 @@ <!-- Used to shift center of pattern horizontally. --> <attr name="horizontalOffset" format="dimension" /> + + <!-- Used when the handle shouldn't wait to be hit before following the finger --> + <attr name="alwaysTrackFinger" format="boolean" /> </declare-styleable> <!-- =============================== --> |