Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b6a3596 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge changes from topic 'am-6b03419d66d24fd58cdd059bde903191' into nyc-mr1-dev-plus-aosp

* changes:
  Merge \\"Add methods for setCarMode()\\" into nyc-mr1-dev am: 81e5dffd am: e372b93b
  Add methods for setCarMode() am: 389f0918 am: 8d6e08e7
parents 2b3b39da 375b6694
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -176,8 +176,18 @@ public class ButtonDispatcher {
        mCurrentView = currentView.findViewById(mId);
    }

    public void setCarMode(boolean carMode) {
        final int N = mViews.size();
        for (int i = 0; i < N; i++) {
            final View view = mViews.get(i);
            if (view instanceof ButtonInterface) {
                ((ButtonInterface) view).setCarMode(carMode);
            }
        }
    }

    /**
     * Interface for ImageView button actions.
     * Interface for button actions.
     */
    public interface ButtonInterface {
        void setImageResource(@DrawableRes int resId);
@@ -187,5 +197,7 @@ public class ButtonDispatcher {
        void abortCurrentGesture();

        void setLandscape(boolean landscape);

        void setCarMode(boolean carMode);
    }
}
+1 −0
Original line number Diff line number Diff line
@@ -624,6 +624,7 @@ public class NavigationBarView extends LinearLayout {
                mCarMode = true;
                uiCarModeChanged = true;
            }
            getHomeButton().setCarMode(mCarMode);
        }
        return uiCarModeChanged;
    }
+5 −0
Original line number Diff line number Diff line
@@ -270,6 +270,11 @@ public class KeyButtonView extends ImageView implements ButtonDispatcher.ButtonI
    public void setLandscape(boolean landscape) {
        //no op
    }

    @Override
    public void setCarMode(boolean carMode) {
        // no op
    }
}