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; data/etc/privapp-permissions-platform.xml +1 −0 Original line number Diff line number Diff line Loading @@ -255,6 +255,7 @@ applications that come with the platform </privapp-permissions> <privapp-permissions package="com.android.networkstack.tethering"> <permission name="android.permission.BLUETOOTH_PRIVILEGED" /> <permission name="android.permission.MANAGE_USB"/> <permission name="android.permission.MODIFY_PHONE_STATE"/> <permission name="android.permission.READ_NETWORK_USAGE_HISTORY"/> Loading packages/Tethering/AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ added to the privileged permissions whitelist for that package. --> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.BLUETOOTH" /> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> <uses-permission android:name="android.permission.BLUETOOTH_PRIVILEGED" /> <uses-permission android:name="android.permission.BROADCAST_STICKY" /> <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> <uses-permission android:name="android.permission.MANAGE_USB" /> Loading 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;
data/etc/privapp-permissions-platform.xml +1 −0 Original line number Diff line number Diff line Loading @@ -255,6 +255,7 @@ applications that come with the platform </privapp-permissions> <privapp-permissions package="com.android.networkstack.tethering"> <permission name="android.permission.BLUETOOTH_PRIVILEGED" /> <permission name="android.permission.MANAGE_USB"/> <permission name="android.permission.MODIFY_PHONE_STATE"/> <permission name="android.permission.READ_NETWORK_USAGE_HISTORY"/> Loading
packages/Tethering/AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ added to the privileged permissions whitelist for that package. --> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.BLUETOOTH" /> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> <uses-permission android:name="android.permission.BLUETOOTH_PRIVILEGED" /> <uses-permission android:name="android.permission.BROADCAST_STICKY" /> <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> <uses-permission android:name="android.permission.MANAGE_USB" /> Loading