Ignore unexpected ACTION_DOWN for SIM avatar icons
Unexpected ACTION_DOWN raises setColorFilter() for SIM avatar icons in the SIM switcher. However, other actions to clear the filter cannot be received due to no clickable attribute. Test: Click SIM icon in SimSelectorView. Change-Id: Ic5972522a3442e3087c474b65add38a6d00511a5 Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
This commit is contained in:
@@ -19,6 +19,7 @@ import android.content.Context;
|
|||||||
import android.graphics.Outline;
|
import android.graphics.Outline;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewOutlineProvider;
|
import android.view.ViewOutlineProvider;
|
||||||
|
|
||||||
@@ -43,6 +44,14 @@ public class SimIconView extends ContactIconView {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onTouchEvent(MotionEvent event) {
|
||||||
|
if (isClickable()) {
|
||||||
|
return super.onTouchEvent(event);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void maybeInitializeOnClickListener() {
|
protected void maybeInitializeOnClickListener() {
|
||||||
// TODO: SIM icon view shouldn't consume or handle clicks, but it should if
|
// TODO: SIM icon view shouldn't consume or handle clicks, but it should if
|
||||||
|
|||||||
Reference in New Issue
Block a user