Merge "Remove touch listener on UsbDebuggingActivity" into rvc-dev am: d8f1c69a68
Change-Id: I4d9b4c98f717b75d6874d0487b26751aaaa8258d
This commit is contained in:
@@ -23,15 +23,12 @@ import android.debug.IAdbManager;
|
||||
import android.os.Bundle;
|
||||
import android.os.IBinder;
|
||||
import android.os.ServiceManager;
|
||||
import android.util.EventLog;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.android.internal.app.AlertActivity;
|
||||
import com.android.internal.app.AlertController;
|
||||
@@ -79,25 +76,6 @@ public class UsbDebuggingActivity extends AlertActivity
|
||||
window.setCloseOnTouchOutside(false);
|
||||
|
||||
setupAlert();
|
||||
|
||||
// adding touch listener on affirmative button - checks if window is obscured
|
||||
// if obscured, do not let user give permissions (could be tapjacking involved)
|
||||
final View.OnTouchListener filterTouchListener = (View v, MotionEvent event) -> {
|
||||
// Filter obscured touches by consuming them.
|
||||
if (((event.getFlags() & MotionEvent.FLAG_WINDOW_IS_OBSCURED) != 0)
|
||||
|| ((event.getFlags() & MotionEvent.FLAG_WINDOW_IS_PARTIALLY_OBSCURED) != 0)) {
|
||||
if (event.getAction() == MotionEvent.ACTION_UP) {
|
||||
EventLog.writeEvent(0x534e4554, "62187985"); // safety net logging
|
||||
Toast.makeText(v.getContext(),
|
||||
R.string.touch_filtered_warning,
|
||||
Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
mAlert.getButton(BUTTON_POSITIVE).setOnTouchListener(filterTouchListener);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user