Merge "Fix6398209: reveal search when home button is long-pressed" into jb-dev
This commit is contained in:
@ -67,6 +67,7 @@ public class MultiWaveView extends View {
|
|||||||
public void onReleased(View v, int handle);
|
public void onReleased(View v, int handle);
|
||||||
public void onTrigger(View v, int target);
|
public void onTrigger(View v, int target);
|
||||||
public void onGrabbedStateChange(View v, int handle);
|
public void onGrabbedStateChange(View v, int handle);
|
||||||
|
public void onFinishFinalAnimation();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tuneable parameters for animation
|
// Tuneable parameters for animation
|
||||||
@ -77,9 +78,13 @@ public class MultiWaveView extends View {
|
|||||||
private static final int HIDE_ANIMATION_DELAY = 200;
|
private static final int HIDE_ANIMATION_DELAY = 200;
|
||||||
private static final int HIDE_ANIMATION_DURATION = 200;
|
private static final int HIDE_ANIMATION_DURATION = 200;
|
||||||
private static final int SHOW_ANIMATION_DURATION = 200;
|
private static final int SHOW_ANIMATION_DURATION = 200;
|
||||||
private static final int SHOW_ANIMATION_DELAY = 0;
|
private static final int SHOW_ANIMATION_DELAY = 50;
|
||||||
private static final float TAP_RADIUS_SCALE_ACCESSIBILITY_ENABLED = 1.3f;
|
private static final float TAP_RADIUS_SCALE_ACCESSIBILITY_ENABLED = 1.3f;
|
||||||
private static final float TARGET_INITIAL_POSITION_SCALE = 0.8f;
|
private static final float TARGET_SCALE_SELECTED = 0.8f;
|
||||||
|
private static final long INITIAL_SHOW_HANDLE_DURATION = 200;
|
||||||
|
private static final float TARGET_SCALE_UNSELECTED = 1.0f;
|
||||||
|
private static final float RING_SCALE_UNSELECTED = 0.5f;
|
||||||
|
private static final float RING_SCALE_SELECTED = 1.5f;
|
||||||
|
|
||||||
private TimeInterpolator mChevronAnimationInterpolator = Ease.Quad.easeOut;
|
private TimeInterpolator mChevronAnimationInterpolator = Ease.Quad.easeOut;
|
||||||
|
|
||||||
@ -126,6 +131,15 @@ public class MultiWaveView extends View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void cancel() {
|
||||||
|
final int count = size();
|
||||||
|
for (int i = 0; i < count; i++) {
|
||||||
|
Tweener anim = get(i);
|
||||||
|
anim.animator.cancel();
|
||||||
|
}
|
||||||
|
clear();
|
||||||
|
}
|
||||||
|
|
||||||
public void stop() {
|
public void stop() {
|
||||||
final int count = size();
|
final int count = size();
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
@ -143,6 +157,7 @@ public class MultiWaveView extends View {
|
|||||||
private AnimatorListener mResetListener = new AnimatorListenerAdapter() {
|
private AnimatorListener mResetListener = new AnimatorListenerAdapter() {
|
||||||
public void onAnimationEnd(Animator animator) {
|
public void onAnimationEnd(Animator animator) {
|
||||||
switchToState(STATE_IDLE, mWaveCenterX, mWaveCenterY);
|
switchToState(STATE_IDLE, mWaveCenterX, mWaveCenterY);
|
||||||
|
dispatchOnFinishFinalAnimation();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -150,6 +165,7 @@ public class MultiWaveView extends View {
|
|||||||
public void onAnimationEnd(Animator animator) {
|
public void onAnimationEnd(Animator animator) {
|
||||||
ping();
|
ping();
|
||||||
switchToState(STATE_IDLE, mWaveCenterX, mWaveCenterY);
|
switchToState(STATE_IDLE, mWaveCenterX, mWaveCenterY);
|
||||||
|
dispatchOnFinishFinalAnimation();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -349,7 +365,7 @@ public class MultiWaveView extends View {
|
|||||||
stopHandleAnimation();
|
stopHandleAnimation();
|
||||||
deactivateTargets();
|
deactivateTargets();
|
||||||
showTargets(true);
|
showTargets(true);
|
||||||
mHandleDrawable.setState(TargetDrawable.STATE_ACTIVE);
|
activateHandle();
|
||||||
setGrabbedState(OnTriggerListener.CENTER_HANDLE);
|
setGrabbedState(OnTriggerListener.CENTER_HANDLE);
|
||||||
if (AccessibilityManager.getInstance(mContext).isEnabled()) {
|
if (AccessibilityManager.getInstance(mContext).isEnabled()) {
|
||||||
announceTargets();
|
announceTargets();
|
||||||
@ -368,6 +384,19 @@ public class MultiWaveView extends View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void activateHandle() {
|
||||||
|
mHandleDrawable.setState(TargetDrawable.STATE_ACTIVE);
|
||||||
|
if (mAlwaysTrackFinger) {
|
||||||
|
mHandleAnimations.stop();
|
||||||
|
mHandleDrawable.setAlpha(0.0f);
|
||||||
|
mHandleAnimations.add(Tweener.to(mHandleDrawable, INITIAL_SHOW_HANDLE_DURATION,
|
||||||
|
"ease", Ease.Cubic.easeIn,
|
||||||
|
"alpha", 1.0f,
|
||||||
|
"onUpdate", mUpdateListener));
|
||||||
|
mHandleAnimations.start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Animation used to attract user's attention to the target button.
|
* Animation used to attract user's attention to the target button.
|
||||||
* Assumes mChevronDrawables is an a list with an even number of chevrons filled with
|
* Assumes mChevronDrawables is an a list with an even number of chevrons filled with
|
||||||
@ -463,6 +492,12 @@ public class MultiWaveView extends View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void dispatchOnFinishFinalAnimation() {
|
||||||
|
if (mOnTriggerListener != null) {
|
||||||
|
mOnTriggerListener.onFinishFinalAnimation();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void doFinish() {
|
private void doFinish() {
|
||||||
final int activeTarget = mActiveTarget;
|
final int activeTarget = mActiveTarget;
|
||||||
boolean targetHit = activeTarget != -1;
|
boolean targetHit = activeTarget != -1;
|
||||||
@ -471,8 +506,9 @@ public class MultiWaveView extends View {
|
|||||||
hideTargets(true);
|
hideTargets(true);
|
||||||
|
|
||||||
// Highlight the selected one
|
// Highlight the selected one
|
||||||
mHandleDrawable.setAlpha(targetHit ? 0.0f : 1.0f);
|
mHandleAnimations.cancel();
|
||||||
if (targetHit) {
|
if (targetHit) {
|
||||||
|
mHandleDrawable.setAlpha(0.0f);
|
||||||
mTargetDrawables.get(activeTarget).setState(TargetDrawable.STATE_ACTIVE);
|
mTargetDrawables.get(activeTarget).setState(TargetDrawable.STATE_ACTIVE);
|
||||||
hideUnselected(activeTarget);
|
hideUnselected(activeTarget);
|
||||||
|
|
||||||
@ -483,12 +519,11 @@ public class MultiWaveView extends View {
|
|||||||
|
|
||||||
// Animate handle back to the center based on current state.
|
// Animate handle back to the center based on current state.
|
||||||
int delay = targetHit ? RETURN_TO_HOME_DELAY : 0;
|
int delay = targetHit ? RETURN_TO_HOME_DELAY : 0;
|
||||||
int duration = targetHit ? 0 : RETURN_TO_HOME_DURATION;
|
int duration = RETURN_TO_HOME_DURATION;
|
||||||
mHandleAnimations.stop();
|
|
||||||
mHandleAnimations.add(Tweener.to(mHandleDrawable, duration,
|
mHandleAnimations.add(Tweener.to(mHandleDrawable, duration,
|
||||||
"ease", Ease.Quart.easeOut,
|
"ease", Ease.Quart.easeOut,
|
||||||
"delay", delay,
|
"delay", delay,
|
||||||
"alpha", 1.0f,
|
"alpha", mAlwaysTrackFinger ? 0.0f : 1.0f,
|
||||||
"x", 0,
|
"x", 0,
|
||||||
"y", 0,
|
"y", 0,
|
||||||
"onUpdate", mUpdateListener,
|
"onUpdate", mUpdateListener,
|
||||||
@ -508,12 +543,15 @@ public class MultiWaveView extends View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void hideTargets(boolean animate) {
|
private void hideTargets(boolean animate) {
|
||||||
mTargetAnimations.stop();
|
mTargetAnimations.cancel();
|
||||||
// Note: these animations should complete at the same time so that we can swap out
|
// Note: these animations should complete at the same time so that we can swap out
|
||||||
// the target assets asynchronously from the setTargetResources() call.
|
// the target assets asynchronously from the setTargetResources() call.
|
||||||
mAnimatingTargets = animate;
|
mAnimatingTargets = animate;
|
||||||
final int duration = animate ? HIDE_ANIMATION_DURATION : 0;
|
final int duration = animate ? HIDE_ANIMATION_DURATION : 0;
|
||||||
final int delay = animate ? HIDE_ANIMATION_DELAY : 0;
|
final int delay = animate ? HIDE_ANIMATION_DELAY : 0;
|
||||||
|
final boolean targetSelected = mActiveTarget != -1;
|
||||||
|
|
||||||
|
final float targetScale = targetSelected ? TARGET_SCALE_SELECTED : TARGET_SCALE_UNSELECTED;
|
||||||
final int length = mTargetDrawables.size();
|
final int length = mTargetDrawables.size();
|
||||||
for (int i = 0; i < length; i++) {
|
for (int i = 0; i < length; i++) {
|
||||||
TargetDrawable target = mTargetDrawables.get(i);
|
TargetDrawable target = mTargetDrawables.get(i);
|
||||||
@ -521,13 +559,13 @@ public class MultiWaveView extends View {
|
|||||||
mTargetAnimations.add(Tweener.to(target, duration,
|
mTargetAnimations.add(Tweener.to(target, duration,
|
||||||
"ease", Ease.Cubic.easeOut,
|
"ease", Ease.Cubic.easeOut,
|
||||||
"alpha", 0.0f,
|
"alpha", 0.0f,
|
||||||
"scaleX", TARGET_INITIAL_POSITION_SCALE,
|
"scaleX", targetScale,
|
||||||
"scaleY", TARGET_INITIAL_POSITION_SCALE,
|
"scaleY", targetScale,
|
||||||
"delay", delay,
|
"delay", delay,
|
||||||
"onUpdate", mUpdateListener));
|
"onUpdate", mUpdateListener));
|
||||||
}
|
}
|
||||||
|
|
||||||
float ringScaleTarget = mActiveTarget != -1 ? 1.5f : 0.5f;
|
final float ringScaleTarget = targetSelected ? RING_SCALE_SELECTED : RING_SCALE_UNSELECTED;
|
||||||
mTargetAnimations.add(Tweener.to(mOuterRing, duration,
|
mTargetAnimations.add(Tweener.to(mOuterRing, duration,
|
||||||
"ease", Ease.Cubic.easeOut,
|
"ease", Ease.Cubic.easeOut,
|
||||||
"alpha", 0.0f,
|
"alpha", 0.0f,
|
||||||
@ -544,13 +582,14 @@ public class MultiWaveView extends View {
|
|||||||
mTargetAnimations.stop();
|
mTargetAnimations.stop();
|
||||||
mAnimatingTargets = animate;
|
mAnimatingTargets = animate;
|
||||||
final int delay = animate ? SHOW_ANIMATION_DELAY : 0;
|
final int delay = animate ? SHOW_ANIMATION_DELAY : 0;
|
||||||
|
final int duration = animate ? SHOW_ANIMATION_DURATION : 0;
|
||||||
final int length = mTargetDrawables.size();
|
final int length = mTargetDrawables.size();
|
||||||
for (int i = 0; i < length; i++) {
|
for (int i = 0; i < length; i++) {
|
||||||
TargetDrawable target = mTargetDrawables.get(i);
|
TargetDrawable target = mTargetDrawables.get(i);
|
||||||
target.setState(TargetDrawable.STATE_INACTIVE);
|
target.setState(TargetDrawable.STATE_INACTIVE);
|
||||||
target.setScaleX(TARGET_INITIAL_POSITION_SCALE);
|
target.setScaleX(TARGET_SCALE_SELECTED);
|
||||||
target.setScaleY(TARGET_INITIAL_POSITION_SCALE);
|
target.setScaleY(TARGET_SCALE_SELECTED);
|
||||||
mTargetAnimations.add(Tweener.to(target, animate ? SHOW_ANIMATION_DURATION : 0,
|
mTargetAnimations.add(Tweener.to(target, duration,
|
||||||
"ease", Ease.Cubic.easeOut,
|
"ease", Ease.Cubic.easeOut,
|
||||||
"alpha", 1.0f,
|
"alpha", 1.0f,
|
||||||
"scaleX", 1.0f,
|
"scaleX", 1.0f,
|
||||||
@ -558,9 +597,7 @@ public class MultiWaveView extends View {
|
|||||||
"delay", delay,
|
"delay", delay,
|
||||||
"onUpdate", mUpdateListener));
|
"onUpdate", mUpdateListener));
|
||||||
}
|
}
|
||||||
mOuterRing.setScaleX(0.5f);
|
mTargetAnimations.add(Tweener.to(mOuterRing, duration,
|
||||||
mOuterRing.setScaleY(0.5f);
|
|
||||||
mTargetAnimations.add(Tweener.to(mOuterRing, animate ? SHOW_ANIMATION_DURATION : 0,
|
|
||||||
"ease", Ease.Cubic.easeOut,
|
"ease", Ease.Cubic.easeOut,
|
||||||
"alpha", 1.0f,
|
"alpha", 1.0f,
|
||||||
"scaleX", 1.0f,
|
"scaleX", 1.0f,
|
||||||
@ -572,10 +609,6 @@ public class MultiWaveView extends View {
|
|||||||
mTargetAnimations.start();
|
mTargetAnimations.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void stopTargetAnimation() {
|
|
||||||
mTargetAnimations.stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void vibrate() {
|
private void vibrate() {
|
||||||
if (mVibrator != null) {
|
if (mVibrator != null) {
|
||||||
mVibrator.vibrate(mVibrationDuration);
|
mVibrator.vibrate(mVibrationDuration);
|
||||||
@ -708,7 +741,7 @@ public class MultiWaveView extends View {
|
|||||||
public void reset(boolean animate) {
|
public void reset(boolean animate) {
|
||||||
stopChevronAnimation();
|
stopChevronAnimation();
|
||||||
stopHandleAnimation();
|
stopHandleAnimation();
|
||||||
stopTargetAnimation();
|
mTargetAnimations.stop();
|
||||||
hideChevrons();
|
hideChevrons();
|
||||||
hideTargets(animate);
|
hideTargets(animate);
|
||||||
mHandleDrawable.setX(0);
|
mHandleDrawable.setX(0);
|
||||||
@ -760,7 +793,7 @@ public class MultiWaveView extends View {
|
|||||||
private void handleDown(MotionEvent event) {
|
private void handleDown(MotionEvent event) {
|
||||||
if (!trySwitchToFirstTouchState(event.getX(), event.getY())) {
|
if (!trySwitchToFirstTouchState(event.getX(), event.getY())) {
|
||||||
mDragging = false;
|
mDragging = false;
|
||||||
stopTargetAnimation();
|
mTargetAnimations.cancel();
|
||||||
ping();
|
ping();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -815,8 +848,8 @@ public class MultiWaveView extends View {
|
|||||||
// For more than one target, snap to the closest one less than hitRadius away.
|
// For more than one target, snap to the closest one less than hitRadius away.
|
||||||
float best = Float.MAX_VALUE;
|
float best = Float.MAX_VALUE;
|
||||||
final float hitRadius2 = mHitRadius * mHitRadius;
|
final float hitRadius2 = mHitRadius * mHitRadius;
|
||||||
|
// Find first target in range
|
||||||
for (int i = 0; i < ntargets; i++) {
|
for (int i = 0; i < ntargets; i++) {
|
||||||
// Snap to the first target in range
|
|
||||||
TargetDrawable target = targets.get(i);
|
TargetDrawable target = targets.get(i);
|
||||||
float dx = limitX - target.getX();
|
float dx = limitX - target.getX();
|
||||||
float dy = limitY - target.getY();
|
float dy = limitY - target.getY();
|
||||||
@ -842,11 +875,16 @@ public class MultiWaveView extends View {
|
|||||||
float newX = singleTarget ? x : target.getX();
|
float newX = singleTarget ? x : target.getX();
|
||||||
float newY = singleTarget ? y : target.getY();
|
float newY = singleTarget ? y : target.getY();
|
||||||
moveHandleTo(newX, newY, false);
|
moveHandleTo(newX, newY, false);
|
||||||
|
mHandleAnimations.cancel();
|
||||||
|
mHandleDrawable.setAlpha(0.0f);
|
||||||
} else {
|
} else {
|
||||||
switchToState(STATE_TRACKING, x, y);
|
switchToState(STATE_TRACKING, x, y);
|
||||||
moveHandleTo(x, y, false);
|
if (mActiveTarget != -1) {
|
||||||
|
mHandleAnimations.cancel();
|
||||||
mHandleDrawable.setAlpha(1.0f);
|
mHandleDrawable.setAlpha(1.0f);
|
||||||
}
|
}
|
||||||
|
moveHandleTo(x, y, false);
|
||||||
|
}
|
||||||
|
|
||||||
// Draw handle outside parent's bounds
|
// Draw handle outside parent's bounds
|
||||||
invalidateGlobalRegion(mHandleDrawable);
|
invalidateGlobalRegion(mHandleDrawable);
|
||||||
@ -857,7 +895,6 @@ public class MultiWaveView extends View {
|
|||||||
TargetDrawable target = targets.get(mActiveTarget);
|
TargetDrawable target = targets.get(mActiveTarget);
|
||||||
if (target.hasState(TargetDrawable.STATE_FOCUSED)) {
|
if (target.hasState(TargetDrawable.STATE_FOCUSED)) {
|
||||||
target.setState(TargetDrawable.STATE_INACTIVE);
|
target.setState(TargetDrawable.STATE_INACTIVE);
|
||||||
mHandleDrawable.setAlpha(1.0f);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Focus the new target
|
// Focus the new target
|
||||||
@ -865,7 +902,6 @@ public class MultiWaveView extends View {
|
|||||||
TargetDrawable target = targets.get(activeTarget);
|
TargetDrawable target = targets.get(activeTarget);
|
||||||
if (target.hasState(TargetDrawable.STATE_FOCUSED)) {
|
if (target.hasState(TargetDrawable.STATE_FOCUSED)) {
|
||||||
target.setState(TargetDrawable.STATE_FOCUSED);
|
target.setState(TargetDrawable.STATE_FOCUSED);
|
||||||
mHandleDrawable.setAlpha(0.0f);
|
|
||||||
}
|
}
|
||||||
dispatchGrabbedEvent(activeTarget);
|
dispatchGrabbedEvent(activeTarget);
|
||||||
if (AccessibilityManager.getInstance(mContext).isEnabled()) {
|
if (AccessibilityManager.getInstance(mContext).isEnabled()) {
|
||||||
|
@ -18,6 +18,8 @@ package com.android.systemui;
|
|||||||
|
|
||||||
import android.animation.Animator;
|
import android.animation.Animator;
|
||||||
import android.animation.LayoutTransition;
|
import android.animation.LayoutTransition;
|
||||||
|
import android.app.ActivityManagerNative;
|
||||||
|
import android.app.ActivityOptions;
|
||||||
import android.app.SearchManager;
|
import android.app.SearchManager;
|
||||||
import android.content.ActivityNotFoundException;
|
import android.content.ActivityNotFoundException;
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
@ -36,6 +38,7 @@ import android.widget.FrameLayout;
|
|||||||
|
|
||||||
import com.android.internal.widget.multiwaveview.MultiWaveView;
|
import com.android.internal.widget.multiwaveview.MultiWaveView;
|
||||||
import com.android.internal.widget.multiwaveview.MultiWaveView.OnTriggerListener;
|
import com.android.internal.widget.multiwaveview.MultiWaveView.OnTriggerListener;
|
||||||
|
import com.android.server.am.ActivityManagerService;
|
||||||
import com.android.systemui.R;
|
import com.android.systemui.R;
|
||||||
import com.android.systemui.recent.StatusBarTouchProxy;
|
import com.android.systemui.recent.StatusBarTouchProxy;
|
||||||
import com.android.systemui.statusbar.BaseStatusBar;
|
import com.android.systemui.statusbar.BaseStatusBar;
|
||||||
@ -103,26 +106,20 @@ public class SearchPanelView extends FrameLayout implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void startAssistActivity() {
|
private void startAssistActivity() {
|
||||||
if (mSearchManager != null) {
|
Intent intent = getAssistIntent();
|
||||||
ComponentName globalSearchActivity = mSearchManager.getGlobalSearchActivity();
|
|
||||||
if (globalSearchActivity != null) {
|
|
||||||
Intent intent = new Intent(Intent.ACTION_ASSIST);
|
|
||||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
intent.setPackage(globalSearchActivity.getPackageName());
|
|
||||||
try {
|
try {
|
||||||
mContext.startActivity(intent);
|
mContext.startActivity(intent);
|
||||||
} catch (ActivityNotFoundException e) {
|
} catch (ActivityNotFoundException e) {
|
||||||
Slog.w(TAG, "Activity not found for " + intent.getAction());
|
Slog.w(TAG, "Activity not found for " + intent.getAction());
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
Slog.w(TAG, "No global search activity");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
final MultiWaveView.OnTriggerListener mMultiWaveViewListener
|
final MultiWaveView.OnTriggerListener mMultiWaveViewListener
|
||||||
= new MultiWaveView.OnTriggerListener() {
|
= new MultiWaveView.OnTriggerListener() {
|
||||||
|
|
||||||
|
private int mTarget = -1;
|
||||||
|
|
||||||
public void onGrabbed(View v, int handle) {
|
public void onGrabbed(View v, int handle) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,12 +133,19 @@ public class SearchPanelView extends FrameLayout implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void onTrigger(View v, int target) {
|
public void onTrigger(View v, int target) {
|
||||||
final int resId = mMultiWaveView.getResourceIdForTarget(target);
|
mTarget = target;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onFinishFinalAnimation() {
|
||||||
|
if (mTarget != -1) {
|
||||||
|
final int resId = mMultiWaveView.getResourceIdForTarget(mTarget);
|
||||||
|
mTarget = -1; // a safety to make sure we never launch w/o prior call to onTrigger
|
||||||
switch (resId) {
|
switch (resId) {
|
||||||
case com.android.internal.R.drawable.ic_lockscreen_search:
|
case com.android.internal.R.drawable.ic_lockscreen_search:
|
||||||
startAssistActivity();
|
startAssistActivity();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
mBar.hideSearchPanel();
|
mBar.hideSearchPanel();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -515,14 +515,8 @@ public class PhoneStatusBar extends BaseStatusBar {
|
|||||||
public boolean onTouch(View v, MotionEvent event) {
|
public boolean onTouch(View v, MotionEvent event) {
|
||||||
switch(event.getAction()) {
|
switch(event.getAction()) {
|
||||||
case MotionEvent.ACTION_DOWN:
|
case MotionEvent.ACTION_DOWN:
|
||||||
Slog.d(TAG, "showing search panel");
|
|
||||||
showSearchPanel();
|
showSearchPanel();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MotionEvent.ACTION_UP:
|
|
||||||
Slog.d(TAG, "hiding search panel");
|
|
||||||
hideSearchPanel();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -533,8 +527,8 @@ public class PhoneStatusBar extends BaseStatusBar {
|
|||||||
|
|
||||||
mNavigationBarView.getRecentsButton().setOnClickListener(mRecentsClickListener);
|
mNavigationBarView.getRecentsButton().setOnClickListener(mRecentsClickListener);
|
||||||
mNavigationBarView.getRecentsButton().setOnTouchListener(mRecentsPanel);
|
mNavigationBarView.getRecentsButton().setOnTouchListener(mRecentsPanel);
|
||||||
|
mNavigationBarView.getHomeButton().setOnTouchListener(mHomeSearchActionListener);
|
||||||
updateSearchPanel();
|
updateSearchPanel();
|
||||||
// mNavigationBarView.getHomeButton().setOnTouchListener(mHomeSearchActionListener);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// For small-screen devices (read: phones) that lack hardware navigation buttons
|
// For small-screen devices (read: phones) that lack hardware navigation buttons
|
||||||
|
@ -188,6 +188,17 @@ public class TabletStatusBar extends BaseStatusBar implements
|
|||||||
|
|
||||||
public Context getContext() { return mContext; }
|
public Context getContext() { return mContext; }
|
||||||
|
|
||||||
|
private View.OnTouchListener mHomeSearchActionListener = new View.OnTouchListener() {
|
||||||
|
public boolean onTouch(View v, MotionEvent event) {
|
||||||
|
switch(event.getAction()) {
|
||||||
|
case MotionEvent.ACTION_DOWN:
|
||||||
|
showSearchPanel();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void createAndAddWindows() {
|
protected void createAndAddWindows() {
|
||||||
addStatusBarWindow();
|
addStatusBarWindow();
|
||||||
@ -290,6 +301,7 @@ public class TabletStatusBar extends BaseStatusBar implements
|
|||||||
|
|
||||||
// Search Panel
|
// Search Panel
|
||||||
mStatusBarView.setBar(this);
|
mStatusBarView.setBar(this);
|
||||||
|
mHomeButton.setOnTouchListener(mHomeSearchActionListener);
|
||||||
updateSearchPanel();
|
updateSearchPanel();
|
||||||
|
|
||||||
// Input methods Panel
|
// Input methods Panel
|
||||||
|
@ -401,6 +401,10 @@ class LockScreen extends LinearLayout implements KeyguardScreen {
|
|||||||
public void cleanUp() {
|
public void cleanUp() {
|
||||||
mMultiWaveView.setOnTriggerListener(null);
|
mMultiWaveView.setOnTriggerListener(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onFinishFinalAnimation() {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void requestUnlockScreen() {
|
private void requestUnlockScreen() {
|
||||||
|
Reference in New Issue
Block a user