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

Commit 6c9aca67 authored by Cary Clark's avatar Cary Clark Committed by Android (Google) Code Review
Browse files

Merge "cancel text selection on rotate"

parents 0dccd0f0 c5cd5e90
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.database.DataSetObserver;
import android.graphics.Bitmap;
@@ -3733,6 +3734,16 @@ public class WebView extends AbsoluteLayout
        return false;
    }

    private int mOrientation = Configuration.ORIENTATION_UNDEFINED;

    @Override
    protected void onConfigurationChanged(Configuration newConfig) {
        if (mSelectingText && mOrientation != newConfig.orientation) {
            selectionDone();
        }
        mOrientation = newConfig.orientation;
    }

    /**
     * Keep track of the Callback so we can end its ActionMode or remove its
     * titlebar.