Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e412ab4e authored by Bill Yi's avatar Bill Yi Committed by Gerrit Code Review
Browse files

Merge "Merge RQ1A.210205.004 to aosp-master - DO NOT MERGE"

parents 60f3d5ce 46b48bcc
Loading
Loading
Loading
Loading
+0 −19
Original line number Diff line number Diff line
@@ -1210,25 +1210,6 @@ public class ResolverActivity extends Activity implements
                        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 {
+1 −9
Original line number Diff line number Diff line
@@ -89,15 +89,7 @@ public class SystemSettingsValidators {
                        return value == null || value.length() < MAX_LENGTH;
                    }
                });
        VALIDATORS.put(
                System.FONT_SCALE,
                value -> {
                    try {
                        return Float.parseFloat(value) >= 0;
                    } catch (NumberFormatException | NullPointerException e) {
                        return false;
                    }
                });
        VALIDATORS.put(System.FONT_SCALE, new InclusiveFloatRangeValidator(0.85f, 1.3f));
        VALIDATORS.put(System.DIM_SCREEN, BOOLEAN_VALIDATOR);
        VALIDATORS.put(
                System.DISPLAY_COLOR_MODE,
+59 −58
Original line number Diff line number Diff line
@@ -7144,13 +7144,12 @@ public class ActivityManagerService extends IActivityManager.Stub
                        "getContentProviderImpl: after checkContentProviderPermission");
                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.
                conn = incProviderCountLocked(r, cpr, token, callingUid, callingPackage, callingTag,
                        stable);
                    // Return the provider instance right away since it already exists.
                    conn = incProviderCountLocked(r, cpr, token, callingUid, callingPackage,
                            callingTag, stable);
                    if (conn != null && (conn.stableCount+conn.unstableCount) == 1) {
                        if (cpr.proc != null
                                && r != null && r.setAdj <= ProcessList.PERCEPTIBLE_LOW_APP_ADJ) {
@@ -7173,7 +7172,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);
@@ -7203,9 +7203,10 @@ public class ActivityManagerService extends IActivityManager.Stub
                    } else {
                        cpr.proc.verifiedAdj = cpr.proc.setAdj;
                    }
                } finally {
                    Binder.restoreCallingIdentity(origId);
                }
            }
            if (!providerRunning) {
                try {
+4 −0
Original line number Diff line number Diff line
@@ -299,6 +299,10 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements
        final ArraySet<File> unclaimedStages = newArraySet(
                stagingDir.listFiles(sStageFilter));

        // We also need to clean up orphaned staging directory for staged sessions
        final File stagedSessionStagingDir = Environment.getDataStagingDirectory(volumeUuid);
        unclaimedStages.addAll(newArraySet(stagedSessionStagingDir.listFiles()));

        // Ignore stages claimed by active sessions
        for (int i = 0; i < mSessions.size(); i++) {
            final PackageInstallerSession session = mSessions.valueAt(i);
+4 −0
Original line number Diff line number Diff line
@@ -1598,6 +1598,10 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
        destroyInternal();
        // Dispatch message to remove session from PackageInstallerService.
        dispatchSessionFinished(error, detailMessage, null);
        // TODO(b/173194203): clean up staged session in destroyInternal() call instead
        if (isStaged() && stageDir != null) {
            cleanStageDir();
        }
    }

    private void onStorageUnhealthy() {
Loading