Loading core/java/com/android/internal/app/ResolverActivity.java +0 −19 Original line number Diff line number Diff line Loading @@ -780,25 +780,6 @@ public class ResolverActivity extends Activity { if (TextUtils.isEmpty(packageName)) { pm.setDefaultBrowserPackageNameAsUser(ri.activityInfo.packageName, userId); } } else { // Update Domain Verification status ComponentName cn = intent.getComponent(); String packageName = cn.getPackageName(); String dataScheme = (data != null) ? data.getScheme() : null; boolean isHttpOrHttps = (dataScheme != null) && (dataScheme.equals(IntentFilter.SCHEME_HTTP) || dataScheme.equals(IntentFilter.SCHEME_HTTPS)); boolean isViewAction = (action != null) && action.equals(Intent.ACTION_VIEW); boolean hasCategoryBrowsable = (categories != null) && categories.contains(Intent.CATEGORY_BROWSABLE); if (isHttpOrHttps && isViewAction && hasCategoryBrowsable) { pm.updateIntentVerificationStatusAsUser(packageName, PackageManager.INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ALWAYS, userId); } } } else { try { Loading core/java/com/android/internal/content/FileSystemProvider.java +11 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,14 @@ public abstract class FileSystemProvider extends DocumentsProvider { protected abstract Uri buildNotificationUri(String docId); /** * Callback indicating that the given document has been deleted or moved. This gives * the provider a hook to revoke the uri permissions. */ protected void onDocIdDeleted(String docId) { // Default is no-op } @Override public boolean onCreate() { throw new UnsupportedOperationException( Loading Loading @@ -221,6 +229,7 @@ public abstract class FileSystemProvider extends DocumentsProvider { } final String afterDocId = getDocIdForFile(after); onDocIdDeleted(docId); moveInMediaStore(visibleFileBefore, getFileForDocId(afterDocId, true)); if (!TextUtils.equals(docId, afterDocId)) { Loading @@ -246,6 +255,7 @@ public abstract class FileSystemProvider extends DocumentsProvider { } final String docId = getDocIdForFile(after); onDocIdDeleted(sourceDocumentId); moveInMediaStore(visibleFileBefore, getFileForDocId(docId, true)); return docId; Loading Loading @@ -295,6 +305,7 @@ public abstract class FileSystemProvider extends DocumentsProvider { throw new IllegalStateException("Failed to delete " + file); } onDocIdDeleted(docId); removeFromMediaStore(visibleFile, isDirectory); } Loading packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java +6 −0 Original line number Diff line number Diff line Loading @@ -384,6 +384,12 @@ public class ExternalStorageProvider extends FileSystemProvider { return DocumentsContract.buildChildDocumentsUri(AUTHORITY, docId); } @Override protected void onDocIdDeleted(String docId) { Uri uri = DocumentsContract.buildDocumentUri(AUTHORITY, docId); getContext().revokeUriPermission(uri, ~0); } @Override public Cursor queryRoots(String[] projection) throws FileNotFoundException { final MatrixCursor result = new MatrixCursor(resolveRootProjection(projection)); Loading services/core/java/com/android/server/am/ActivityManagerService.java +57 −56 Original line number Diff line number Diff line Loading @@ -11606,11 +11606,10 @@ public class ActivityManagerService extends IActivityManager.Stub } final long origId = Binder.clearCallingIdentity(); try { checkTime(startTime, "getContentProviderImpl: incProviderCountLocked"); // In this case the provider instance already exists, so we can // return it right away. // Return the provider instance right away since it already exists. conn = incProviderCountLocked(r, cpr, token, stable); if (conn != null && (conn.stableCount+conn.unstableCount) == 1) { if (cpr.proc != null && r.setAdj <= ProcessList.PERCEPTIBLE_APP_ADJ) { Loading @@ -11632,7 +11631,8 @@ public class ActivityManagerService extends IActivityManager.Stub // it, we will check whether the process still exists. Note that this doesn't // completely get rid of races with LMK killing the process, but should make // them much smaller. if (success && verifiedAdj != cpr.proc.setAdj && !isProcessAliveLocked(cpr.proc)) { if (success && verifiedAdj != cpr.proc.setAdj && !isProcessAliveLocked(cpr.proc)) { success = false; } maybeUpdateProviderUsageStatsLocked(r, cpr.info.packageName, name); Loading Loading @@ -11663,9 +11663,10 @@ public class ActivityManagerService extends IActivityManager.Stub } else { cpr.proc.verifiedAdj = cpr.proc.setAdj; } } finally { Binder.restoreCallingIdentity(origId); } } if (!providerRunning) { try { services/core/java/com/android/server/wm/AppTransition.java +1 −0 Original line number Diff line number Diff line Loading @@ -177,6 +177,7 @@ public class AppTransition implements Dump { private static final int MAX_CLIP_REVEAL_TRANSITION_DURATION = 420; private static final int THUMBNAIL_APP_TRANSITION_DURATION = 336; private static final long APP_TRANSITION_TIMEOUT_MS = 5000; static final int MAX_APP_TRANSITION_DURATION = 3 * 1000; // 3 secs. private final Context mContext; private final WindowManagerService mService; Loading Loading
core/java/com/android/internal/app/ResolverActivity.java +0 −19 Original line number Diff line number Diff line Loading @@ -780,25 +780,6 @@ public class ResolverActivity extends Activity { if (TextUtils.isEmpty(packageName)) { pm.setDefaultBrowserPackageNameAsUser(ri.activityInfo.packageName, userId); } } else { // Update Domain Verification status ComponentName cn = intent.getComponent(); String packageName = cn.getPackageName(); String dataScheme = (data != null) ? data.getScheme() : null; boolean isHttpOrHttps = (dataScheme != null) && (dataScheme.equals(IntentFilter.SCHEME_HTTP) || dataScheme.equals(IntentFilter.SCHEME_HTTPS)); boolean isViewAction = (action != null) && action.equals(Intent.ACTION_VIEW); boolean hasCategoryBrowsable = (categories != null) && categories.contains(Intent.CATEGORY_BROWSABLE); if (isHttpOrHttps && isViewAction && hasCategoryBrowsable) { pm.updateIntentVerificationStatusAsUser(packageName, PackageManager.INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ALWAYS, userId); } } } else { try { Loading
core/java/com/android/internal/content/FileSystemProvider.java +11 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,14 @@ public abstract class FileSystemProvider extends DocumentsProvider { protected abstract Uri buildNotificationUri(String docId); /** * Callback indicating that the given document has been deleted or moved. This gives * the provider a hook to revoke the uri permissions. */ protected void onDocIdDeleted(String docId) { // Default is no-op } @Override public boolean onCreate() { throw new UnsupportedOperationException( Loading Loading @@ -221,6 +229,7 @@ public abstract class FileSystemProvider extends DocumentsProvider { } final String afterDocId = getDocIdForFile(after); onDocIdDeleted(docId); moveInMediaStore(visibleFileBefore, getFileForDocId(afterDocId, true)); if (!TextUtils.equals(docId, afterDocId)) { Loading @@ -246,6 +255,7 @@ public abstract class FileSystemProvider extends DocumentsProvider { } final String docId = getDocIdForFile(after); onDocIdDeleted(sourceDocumentId); moveInMediaStore(visibleFileBefore, getFileForDocId(docId, true)); return docId; Loading Loading @@ -295,6 +305,7 @@ public abstract class FileSystemProvider extends DocumentsProvider { throw new IllegalStateException("Failed to delete " + file); } onDocIdDeleted(docId); removeFromMediaStore(visibleFile, isDirectory); } Loading
packages/ExternalStorageProvider/src/com/android/externalstorage/ExternalStorageProvider.java +6 −0 Original line number Diff line number Diff line Loading @@ -384,6 +384,12 @@ public class ExternalStorageProvider extends FileSystemProvider { return DocumentsContract.buildChildDocumentsUri(AUTHORITY, docId); } @Override protected void onDocIdDeleted(String docId) { Uri uri = DocumentsContract.buildDocumentUri(AUTHORITY, docId); getContext().revokeUriPermission(uri, ~0); } @Override public Cursor queryRoots(String[] projection) throws FileNotFoundException { final MatrixCursor result = new MatrixCursor(resolveRootProjection(projection)); Loading
services/core/java/com/android/server/am/ActivityManagerService.java +57 −56 Original line number Diff line number Diff line Loading @@ -11606,11 +11606,10 @@ public class ActivityManagerService extends IActivityManager.Stub } final long origId = Binder.clearCallingIdentity(); try { checkTime(startTime, "getContentProviderImpl: incProviderCountLocked"); // In this case the provider instance already exists, so we can // return it right away. // Return the provider instance right away since it already exists. conn = incProviderCountLocked(r, cpr, token, stable); if (conn != null && (conn.stableCount+conn.unstableCount) == 1) { if (cpr.proc != null && r.setAdj <= ProcessList.PERCEPTIBLE_APP_ADJ) { Loading @@ -11632,7 +11631,8 @@ public class ActivityManagerService extends IActivityManager.Stub // it, we will check whether the process still exists. Note that this doesn't // completely get rid of races with LMK killing the process, but should make // them much smaller. if (success && verifiedAdj != cpr.proc.setAdj && !isProcessAliveLocked(cpr.proc)) { if (success && verifiedAdj != cpr.proc.setAdj && !isProcessAliveLocked(cpr.proc)) { success = false; } maybeUpdateProviderUsageStatsLocked(r, cpr.info.packageName, name); Loading Loading @@ -11663,9 +11663,10 @@ public class ActivityManagerService extends IActivityManager.Stub } else { cpr.proc.verifiedAdj = cpr.proc.setAdj; } } finally { Binder.restoreCallingIdentity(origId); } } if (!providerRunning) { try {
services/core/java/com/android/server/wm/AppTransition.java +1 −0 Original line number Diff line number Diff line Loading @@ -177,6 +177,7 @@ public class AppTransition implements Dump { private static final int MAX_CLIP_REVEAL_TRANSITION_DURATION = 420; private static final int THUMBNAIL_APP_TRANSITION_DURATION = 336; private static final long APP_TRANSITION_TIMEOUT_MS = 5000; static final int MAX_APP_TRANSITION_DURATION = 3 * 1000; // 3 secs. private final Context mContext; private final WindowManagerService mService; Loading