Loading core/java/android/view/View.java +24 −25 Original line number Diff line number Diff line Loading @@ -9581,18 +9581,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, // First check if context has client, so it saves a service lookup when it doesn't if (mContext.getContentCaptureOptions() == null) return; // Then check if it's enabled in the context... final ContentCaptureManager ccm = ai != null ? ai.getContentCaptureManager(mContext) : mContext.getSystemService(ContentCaptureManager.class); if (ccm == null || !ccm.isContentCaptureEnabled()) return; // ... and finally at the view level // NOTE: isImportantForContentCapture() is more expensive than cm.isContentCaptureEnabled() if (!isImportantForContentCapture()) return; ContentCaptureSession session = getContentCaptureSession(); if (session == null) return; if (appeared) { if (!isLaidOut() || getVisibility() != VISIBLE || (mPrivateFlags4 & PFLAG4_NOTIFIED_CONTENT_CAPTURE_APPEARED) != 0) { Loading @@ -9607,15 +9595,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } return; } setNotifiedContentCaptureAppeared(); if (ai != null) { ai.delayNotifyContentCaptureEvent(session, this, appeared); } else { if (DEBUG_CONTENT_CAPTURE) { Log.w(CONTENT_CAPTURE_LOG_TAG, "no AttachInfo on appeared for " + this); } } } else { if ((mPrivateFlags4 & PFLAG4_NOTIFIED_CONTENT_CAPTURE_APPEARED) == 0 || (mPrivateFlags4 & PFLAG4_NOTIFIED_CONTENT_CAPTURE_DISAPPEARED) != 0) { Loading @@ -9630,6 +9609,26 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } return; } } ContentCaptureSession session = getContentCaptureSession(); if (session == null) return; // ... and finally at the view level // NOTE: isImportantForContentCapture() is more expensive than cm.isContentCaptureEnabled() if (!isImportantForContentCapture()) return; if (appeared) { setNotifiedContentCaptureAppeared(); if (ai != null) { ai.delayNotifyContentCaptureEvent(session, this, appeared); } else { if (DEBUG_CONTENT_CAPTURE) { Log.w(CONTENT_CAPTURE_LOG_TAG, "no AttachInfo on appeared for " + this); } } } else { mPrivateFlags4 |= PFLAG4_NOTIFIED_CONTENT_CAPTURE_DISAPPEARED; mPrivateFlags4 &= ~PFLAG4_NOTIFIED_CONTENT_CAPTURE_APPEARED; Loading
core/java/android/view/View.java +24 −25 Original line number Diff line number Diff line Loading @@ -9581,18 +9581,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, // First check if context has client, so it saves a service lookup when it doesn't if (mContext.getContentCaptureOptions() == null) return; // Then check if it's enabled in the context... final ContentCaptureManager ccm = ai != null ? ai.getContentCaptureManager(mContext) : mContext.getSystemService(ContentCaptureManager.class); if (ccm == null || !ccm.isContentCaptureEnabled()) return; // ... and finally at the view level // NOTE: isImportantForContentCapture() is more expensive than cm.isContentCaptureEnabled() if (!isImportantForContentCapture()) return; ContentCaptureSession session = getContentCaptureSession(); if (session == null) return; if (appeared) { if (!isLaidOut() || getVisibility() != VISIBLE || (mPrivateFlags4 & PFLAG4_NOTIFIED_CONTENT_CAPTURE_APPEARED) != 0) { Loading @@ -9607,15 +9595,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } return; } setNotifiedContentCaptureAppeared(); if (ai != null) { ai.delayNotifyContentCaptureEvent(session, this, appeared); } else { if (DEBUG_CONTENT_CAPTURE) { Log.w(CONTENT_CAPTURE_LOG_TAG, "no AttachInfo on appeared for " + this); } } } else { if ((mPrivateFlags4 & PFLAG4_NOTIFIED_CONTENT_CAPTURE_APPEARED) == 0 || (mPrivateFlags4 & PFLAG4_NOTIFIED_CONTENT_CAPTURE_DISAPPEARED) != 0) { Loading @@ -9630,6 +9609,26 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } return; } } ContentCaptureSession session = getContentCaptureSession(); if (session == null) return; // ... and finally at the view level // NOTE: isImportantForContentCapture() is more expensive than cm.isContentCaptureEnabled() if (!isImportantForContentCapture()) return; if (appeared) { setNotifiedContentCaptureAppeared(); if (ai != null) { ai.delayNotifyContentCaptureEvent(session, this, appeared); } else { if (DEBUG_CONTENT_CAPTURE) { Log.w(CONTENT_CAPTURE_LOG_TAG, "no AttachInfo on appeared for " + this); } } } else { mPrivateFlags4 |= PFLAG4_NOTIFIED_CONTENT_CAPTURE_DISAPPEARED; mPrivateFlags4 &= ~PFLAG4_NOTIFIED_CONTENT_CAPTURE_APPEARED;