Determine if NPVC is intercepting touches from footer
In normal cases, in taps on the FooterActionsView area, we should see NPVC#onInterceptTouchEvent called and then FooterActionsView#onInterceptTouchEvent. However, if NPVC is intercepting the touches, the second call won't happen. To enable, run: adb shell setprop log.tag.PanelView VERBOSE adb shell setprop log.tag.FooterActionsView VERBOSE adb shell am crash com.android.systemui This will restart SystemUI so needs to be done before observing the issue. Bug: 235072946 Test: logcat Change-Id: Ie0eaf9441162fc380ed373916a2acd824c8da930
This commit is contained in:
@@ -22,6 +22,8 @@ import android.graphics.drawable.Drawable
|
||||
import android.graphics.drawable.RippleDrawable
|
||||
import android.os.UserManager
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import android.widget.LinearLayout
|
||||
@@ -101,4 +103,18 @@ class FooterActionsView(context: Context?, attrs: AttributeSet?) : LinearLayout(
|
||||
}
|
||||
multiUserAvatar.setImageDrawable(pictureToSet)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onInterceptTouchEvent(ev: MotionEvent?): Boolean {
|
||||
if (VERBOSE) Log.d(TAG, "FooterActionsView onInterceptTouchEvent ${ev?.string}")
|
||||
return super.onInterceptTouchEvent(ev)
|
||||
}
|
||||
|
||||
override fun onTouchEvent(event: MotionEvent?): Boolean {
|
||||
if (VERBOSE) Log.d(TAG, "FooterActionsView onTouchEvent ${event?.string}")
|
||||
return super.onTouchEvent(event)
|
||||
}
|
||||
}
|
||||
private const val TAG = "FooterActionsView"
|
||||
private val VERBOSE = Log.isLoggable(TAG, Log.VERBOSE)
|
||||
private val MotionEvent.string
|
||||
get() = "($id): ($x,$y)"
|
||||
@@ -4142,6 +4142,11 @@ public class NotificationPanelViewController extends PanelViewController {
|
||||
|
||||
@Override
|
||||
public boolean onInterceptTouchEvent(MotionEvent event) {
|
||||
if (SPEW_LOGCAT) {
|
||||
Log.v(TAG,
|
||||
"NPVC onInterceptTouchEvent (" + event.getId() + "): (" + event.getX()
|
||||
+ "," + event.getY() + ")");
|
||||
}
|
||||
if (mBlockTouches || mQs.disallowPanelTouches()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user