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

Commit dfa984e9 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou Committed by Android (Google) Code Review
Browse files

Merge "Re-revive DeadZone"

parents 045de63a fdb42774
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -131,9 +131,6 @@ public class NavigationBarInflaterView extends FrameLayout
        mRot90.setId(R.id.rot90);
        addView(mRot90);
        updateAlternativeOrder();
        if (getParent() instanceof NavigationBarView) {
            ((NavigationBarView) getParent()).updateRotatedViews();
        }
    }

    protected String getDefaultLayout() {
+6 −8
Original line number Diff line number Diff line
@@ -558,7 +558,6 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
    public void onFinishInflate() {
        mNavigationInflaterView = (NavigationBarInflaterView) findViewById(
                R.id.navigation_inflater);
        updateRotatedViews();
        mNavigationInflaterView.setButtonDispatchers(mButtonDispatchers);

        getImeSwitchButton().setOnClickListener(mImeSwitcherClickListener);
@@ -567,16 +566,14 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
            mDockedStackExists = exists;
            updateRecentsIcon();
        }));
        updateRotatedViews();
    }

    void updateRotatedViews() {
    private void updateRotatedViews() {
        mRotatedViews[Surface.ROTATION_0] =
                mRotatedViews[Surface.ROTATION_180] = findViewById(R.id.rot0);
        mRotatedViews[Surface.ROTATION_270] =
                mRotatedViews[Surface.ROTATION_90] = findViewById(R.id.rot90);

        mCurrentRotation = -1;
        reorient();
    }

    public boolean needsReorient(int rotation) {
@@ -615,9 +612,9 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
        }

        mDeadZone = (DeadZone) mCurrentView.findViewById(R.id.deadzone);
        if (getRootView() instanceof NavigationBarFrame) {

        ((NavigationBarFrame) getRootView()).setDeadZone(mDeadZone);
        }

        mDeadZone.setDisplayRotation(mCurrentRotation);

        // force the low profile & disabled states into compliance
@@ -757,6 +754,7 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
    @Override
    protected void onAttachedToWindow() {
        super.onAttachedToWindow();
        reorient();
        onPluginDisconnected(null); // Create default gesture helper
        Dependency.get(PluginManager.class).addPluginListener(this,
                NavGesture.class, false /* Only one */);