Merge "Remove up pointing arrow in navbar." into lmp-preview-dev
|
Before Width: | Height: | Size: 685 B |
|
Before Width: | Height: | Size: 695 B |
|
Before Width: | Height: | Size: 537 B |
|
Before Width: | Height: | Size: 555 B |
|
Before Width: | Height: | Size: 939 B |
|
Before Width: | Height: | Size: 959 B |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
@@ -158,17 +158,6 @@
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<com.android.systemui.statusbar.policy.KeyButtonView
|
||||
android:layout_width="80dp"
|
||||
android:id="@+id/search_light"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/search_light"
|
||||
android:scaleType="center"
|
||||
android:visibility="gone"
|
||||
android:contentDescription="@string/accessibility_search_light"
|
||||
/>
|
||||
|
||||
<com.android.systemui.statusbar.policy.DeadZone
|
||||
android:id="@+id/deadzone"
|
||||
android:layout_height="match_parent"
|
||||
@@ -316,17 +305,6 @@
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<com.android.systemui.statusbar.policy.KeyButtonView
|
||||
android:id="@+id/search_light"
|
||||
android:layout_height="80dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/search_light"
|
||||
android:scaleType="center"
|
||||
android:visibility="gone"
|
||||
android:contentDescription="@string/accessibility_search_light"
|
||||
/>
|
||||
|
||||
<com.android.systemui.statusbar.policy.DeadZone
|
||||
android:id="@+id/deadzone"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
@@ -156,17 +156,6 @@
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<com.android.systemui.statusbar.policy.KeyButtonView
|
||||
android:layout_width="128dp"
|
||||
android:id="@+id/search_light"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/search_light"
|
||||
android:scaleType="center"
|
||||
android:visibility="gone"
|
||||
android:contentDescription="@string/accessibility_search_light"
|
||||
/>
|
||||
|
||||
<com.android.systemui.statusbar.policy.DeadZone
|
||||
android:id="@+id/deadzone"
|
||||
android:layout_height="match_parent"
|
||||
@@ -313,17 +302,6 @@
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<com.android.systemui.statusbar.policy.KeyButtonView
|
||||
android:layout_width="162dp"
|
||||
android:id="@+id/search_light"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/search_light"
|
||||
android:scaleType="center"
|
||||
android:visibility="gone"
|
||||
android:contentDescription="@string/accessibility_search_light"
|
||||
/>
|
||||
|
||||
<com.android.systemui.statusbar.policy.DeadZone
|
||||
android:id="@+id/deadzone"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
@@ -160,22 +160,6 @@
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.android.systemui.statusbar.policy.KeyButtonView
|
||||
android:layout_width="80dp"
|
||||
android:id="@+id/search_light"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/search_light"
|
||||
android:scaleType="center"
|
||||
android:visibility="gone"
|
||||
android:contentDescription="@string/accessibility_search_light"
|
||||
/>
|
||||
</FrameLayout>
|
||||
|
||||
<com.android.systemui.statusbar.policy.DeadZone
|
||||
android:id="@+id/deadzone"
|
||||
android:layout_height="match_parent"
|
||||
@@ -325,19 +309,6 @@
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<com.android.systemui.statusbar.policy.KeyButtonView
|
||||
android:id="@+id/search_light"
|
||||
android:layout_height="80dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/search_light_land"
|
||||
android:scaleType="center"
|
||||
android:visibility="gone"
|
||||
android:contentDescription="@string/accessibility_search_light"
|
||||
/>
|
||||
|
||||
<!-- No camera button in landscape mode -->
|
||||
|
||||
<com.android.systemui.statusbar.policy.DeadZone
|
||||
android:id="@+id/deadzone"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
@@ -30,7 +30,6 @@ import com.android.systemui.statusbar.policy.KeyButtonView;
|
||||
|
||||
public final class NavigationBarTransitions extends BarTransitions {
|
||||
|
||||
private static final float KEYGUARD_QUIESCENT_ALPHA = 0.5f;
|
||||
private static final int CONTENT_FADE_DURATION = 200;
|
||||
|
||||
private final NavigationBarView mView;
|
||||
@@ -81,8 +80,6 @@ public final class NavigationBarTransitions extends BarTransitions {
|
||||
setKeyButtonViewQuiescentAlpha(mView.getRecentsButton(), alpha, animate);
|
||||
setKeyButtonViewQuiescentAlpha(mView.getMenuButton(), alpha, animate);
|
||||
|
||||
setKeyButtonViewQuiescentAlpha(mView.getSearchLight(), KEYGUARD_QUIESCENT_ALPHA, animate);
|
||||
|
||||
applyBackButtonQuiescentAlpha(mode, animate);
|
||||
|
||||
// apply to lights out
|
||||
@@ -96,7 +93,6 @@ public final class NavigationBarTransitions extends BarTransitions {
|
||||
|
||||
public void applyBackButtonQuiescentAlpha(int mode, boolean animate) {
|
||||
float backAlpha = 0;
|
||||
backAlpha = maxVisibleQuiescentAlpha(backAlpha, mView.getSearchLight());
|
||||
backAlpha = maxVisibleQuiescentAlpha(backAlpha, mView.getHomeButton());
|
||||
backAlpha = maxVisibleQuiescentAlpha(backAlpha, mView.getRecentsButton());
|
||||
backAlpha = maxVisibleQuiescentAlpha(backAlpha, mView.getMenuButton());
|
||||
@@ -116,7 +112,6 @@ public final class NavigationBarTransitions extends BarTransitions {
|
||||
public void setContentVisible(boolean visible) {
|
||||
final float alpha = visible ? 1 : 0;
|
||||
fadeContent(mView.getBackButton(), alpha);
|
||||
fadeContent(mView.getSearchLight(), alpha);
|
||||
}
|
||||
|
||||
private void fadeContent(View v, float alpha) {
|
||||
|
||||
@@ -133,16 +133,6 @@ public class NavigationBarView extends LinearLayout {
|
||||
}
|
||||
}
|
||||
|
||||
// simplified click handler to be used when device is in accessibility mode
|
||||
private final OnClickListener mAccessibilityClickListener = new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (v.getId() == R.id.search_light) {
|
||||
KeyguardTouchDelegate.getInstance(getContext()).showAssistant();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private final OnClickListener mImeSwitcherClickListener = new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
@@ -246,11 +236,6 @@ public class NavigationBarView extends LinearLayout {
|
||||
return mCurrentView.findViewById(R.id.ime_switcher);
|
||||
}
|
||||
|
||||
// for when home is disabled, but search isn't
|
||||
public View getSearchLight() {
|
||||
return mCurrentView.findViewById(R.id.search_light);
|
||||
}
|
||||
|
||||
private void getIcons(Resources res) {
|
||||
mBackIcon = res.getDrawable(R.drawable.ic_sysbar_back);
|
||||
mBackLandIcon = res.getDrawable(R.drawable.ic_sysbar_back_land);
|
||||
@@ -345,9 +330,6 @@ public class NavigationBarView extends LinearLayout {
|
||||
getHomeButton() .setVisibility(disableHome ? View.INVISIBLE : View.VISIBLE);
|
||||
getRecentsButton().setVisibility(disableRecent ? View.INVISIBLE : View.VISIBLE);
|
||||
|
||||
final boolean showSearch = disableHome && !disableSearch;
|
||||
setVisibleOrGone(getSearchLight(), showSearch);
|
||||
|
||||
mBarTransitions.applyBackButtonQuiescentAlpha(mBarTransitions.getMode(), true /*animate*/);
|
||||
}
|
||||
|
||||
@@ -402,38 +384,6 @@ public class NavigationBarView extends LinearLayout {
|
||||
mCurrentView = mRotatedViews[Surface.ROTATION_0];
|
||||
|
||||
getImeSwitchButton().setOnClickListener(mImeSwitcherClickListener);
|
||||
|
||||
watchForAccessibilityChanges();
|
||||
}
|
||||
|
||||
private void watchForAccessibilityChanges() {
|
||||
final AccessibilityManager am =
|
||||
(AccessibilityManager) getContext().getSystemService(Context.ACCESSIBILITY_SERVICE);
|
||||
|
||||
// Set the initial state
|
||||
enableAccessibility(am.isTouchExplorationEnabled());
|
||||
|
||||
// Watch for changes
|
||||
am.addTouchExplorationStateChangeListener(new TouchExplorationStateChangeListener() {
|
||||
@Override
|
||||
public void onTouchExplorationStateChanged(boolean enabled) {
|
||||
enableAccessibility(enabled);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void enableAccessibility(boolean touchEnabled) {
|
||||
Log.v(TAG, "touchEnabled:" + touchEnabled);
|
||||
|
||||
// Add a touch handler or accessibility click listener for camera and search buttons
|
||||
// for all view orientations.
|
||||
final OnClickListener onClickListener = touchEnabled ? mAccessibilityClickListener : null;
|
||||
for (int i = 0; i < mRotatedViews.length; i++) {
|
||||
final View searchLight = mRotatedViews[i].findViewById(R.id.search_light);
|
||||
if (searchLight != null) {
|
||||
searchLight.setOnClickListener(onClickListener);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isVertical() {
|
||||
@@ -571,7 +521,6 @@ public class NavigationBarView extends LinearLayout {
|
||||
dumpButton(pw, "home", getHomeButton());
|
||||
dumpButton(pw, "rcnt", getRecentsButton());
|
||||
dumpButton(pw, "menu", getMenuButton());
|
||||
dumpButton(pw, "srch", getSearchLight());
|
||||
|
||||
pw.println(" }");
|
||||
}
|
||||
|
||||
@@ -86,7 +86,6 @@ import android.view.animation.Animation;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.view.animation.DecelerateInterpolator;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -890,7 +889,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
||||
}
|
||||
};
|
||||
|
||||
View.OnTouchListener mHomeSearchActionListener = new View.OnTouchListener() {
|
||||
View.OnTouchListener mHomeActionListener = new View.OnTouchListener() {
|
||||
public boolean onTouch(View v, MotionEvent event) {
|
||||
switch(event.getAction()) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
@@ -925,8 +924,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
||||
|
||||
mNavigationBarView.getRecentsButton().setOnClickListener(mRecentsClickListener);
|
||||
mNavigationBarView.getRecentsButton().setOnTouchListener(mRecentsPreloadOnTouchListener);
|
||||
mNavigationBarView.getHomeButton().setOnTouchListener(mHomeSearchActionListener);
|
||||
mNavigationBarView.getSearchLight().setOnTouchListener(mHomeSearchActionListener);
|
||||
mNavigationBarView.getHomeButton().setOnTouchListener(mHomeActionListener);
|
||||
updateSearchPanel();
|
||||
}
|
||||
|
||||
|
||||