Loading packages/SystemUI/src/com/android/systemui/statusbar/DelegateViewHelper.java +9 −5 Original line number Diff line number Diff line Loading @@ -33,11 +33,7 @@ public class DelegateViewHelper { private float mTriggerThreshhold; public DelegateViewHelper(View sourceView) { mSourceView = sourceView; if (mSourceView != null) { mTriggerThreshhold = mSourceView.getContext().getResources() .getDimension(R.dimen.navbar_search_up_threshhold); } setSourceView(sourceView); } public void setDelegateView(View view) { Loading Loading @@ -92,4 +88,12 @@ public class DelegateViewHelper { } return false; } public void setSourceView(View view) { mSourceView = view; if (mSourceView != null) { mTriggerThreshhold = mSourceView.getContext().getResources() .getDimension(R.dimen.navbar_search_up_threshhold); } } } No newline at end of file packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarView.java +16 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.statusbar.tablet; import com.android.systemui.R; import com.android.systemui.statusbar.BaseStatusBar; import com.android.systemui.statusbar.DelegateViewHelper; Loading @@ -37,8 +38,7 @@ public class TabletStatusBarView extends FrameLayout { private DelegateViewHelper mDelegateHelper; public TabletStatusBarView(Context context) { super(context); mDelegateHelper = new DelegateViewHelper(this); this(context, null); } public TabletStatusBarView(Context context, AttributeSet attrs) { Loading @@ -54,6 +54,20 @@ public class TabletStatusBarView extends FrameLayout { mDelegateHelper.setBar(phoneStatusBar); } @Override protected void onFinishInflate() { super.onFinishInflate(); // Find the view we wish to grab events from in order to detect search gesture. // Depending on the device, this will be one of the id's listed below. // If we don't find one, we'll use the view provided in the constructor above (this view). View view = null; if ((view = findViewById(R.id.navigationArea)) != null) { mDelegateHelper.setSourceView(view); } else if ((view = findViewById(R.id.nav_buttons)) != null) { mDelegateHelper.setSourceView(view); } } @Override public boolean onInterceptTouchEvent(MotionEvent ev) { if (ev.getAction() == MotionEvent.ACTION_DOWN) { Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/DelegateViewHelper.java +9 −5 Original line number Diff line number Diff line Loading @@ -33,11 +33,7 @@ public class DelegateViewHelper { private float mTriggerThreshhold; public DelegateViewHelper(View sourceView) { mSourceView = sourceView; if (mSourceView != null) { mTriggerThreshhold = mSourceView.getContext().getResources() .getDimension(R.dimen.navbar_search_up_threshhold); } setSourceView(sourceView); } public void setDelegateView(View view) { Loading Loading @@ -92,4 +88,12 @@ public class DelegateViewHelper { } return false; } public void setSourceView(View view) { mSourceView = view; if (mSourceView != null) { mTriggerThreshhold = mSourceView.getContext().getResources() .getDimension(R.dimen.navbar_search_up_threshhold); } } } No newline at end of file
packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBarView.java +16 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.systemui.statusbar.tablet; import com.android.systemui.R; import com.android.systemui.statusbar.BaseStatusBar; import com.android.systemui.statusbar.DelegateViewHelper; Loading @@ -37,8 +38,7 @@ public class TabletStatusBarView extends FrameLayout { private DelegateViewHelper mDelegateHelper; public TabletStatusBarView(Context context) { super(context); mDelegateHelper = new DelegateViewHelper(this); this(context, null); } public TabletStatusBarView(Context context, AttributeSet attrs) { Loading @@ -54,6 +54,20 @@ public class TabletStatusBarView extends FrameLayout { mDelegateHelper.setBar(phoneStatusBar); } @Override protected void onFinishInflate() { super.onFinishInflate(); // Find the view we wish to grab events from in order to detect search gesture. // Depending on the device, this will be one of the id's listed below. // If we don't find one, we'll use the view provided in the constructor above (this view). View view = null; if ((view = findViewById(R.id.navigationArea)) != null) { mDelegateHelper.setSourceView(view); } else if ((view = findViewById(R.id.nav_buttons)) != null) { mDelegateHelper.setSourceView(view); } } @Override public boolean onInterceptTouchEvent(MotionEvent ev) { if (ev.getAction() == MotionEvent.ACTION_DOWN) { Loading