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

Commit e6897f14 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Make change and version bump to r_aml_300802300 for mainline module file:...

Make change and version bump to r_aml_300802300 for mainline module file: packages/Tethering/apex/manifest.json

Change-Id: Ie54721e710eda02bda97af622520078fca01d632
parents 71310bb9 cf3ae16a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@ android_test {
    srcs: ["src/**/*.java"],
    static_libs: [
        "androidx.test.rules",
        "collector-device-lib-platform",
        "apct-perftests-utils",
    ],
    platform_apis: true,
+4 −0
Original line number Diff line number Diff line
@@ -17,12 +17,16 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.android.perftests.multiuser">

    <uses-sdk android:targetSdkVersion="28" />

    <uses-permission android:name="android.permission.CONTROL_KEYGUARD" />
    <uses-permission android:name="android.permission.MANAGE_USERS" />
    <uses-permission android:name="android.permission.INSTALL_PACKAGES" />
    <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS" />
    <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" />
    <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.REAL_GET_TASKS" />

    <application>
        <uses-library android:name="android.test.runner" />
+24 −0
Original line number Diff line number Diff line
@@ -131,6 +131,16 @@ class BlobStoreConfig {
        public static boolean USE_REVOCABLE_FD_FOR_READS =
                DEFAULT_USE_REVOCABLE_FD_FOR_READS;

        /**
         * Denotes how long before a blob is deleted, once the last lease on it is released.
         */
        public static final String KEY_DELETE_ON_LAST_LEASE_DELAY_MS =
                "delete_on_last_lease_delay_ms";
        public static final long DEFAULT_DELETE_ON_LAST_LEASE_DELAY_MS =
                TimeUnit.HOURS.toMillis(6);
        public static long DELETE_ON_LAST_LEASE_DELAY_MS =
                DEFAULT_DELETE_ON_LAST_LEASE_DELAY_MS;

        static void refresh(Properties properties) {
            if (!NAMESPACE_BLOBSTORE.equals(properties.getNamespace())) {
                return;
@@ -164,6 +174,10 @@ class BlobStoreConfig {
                        USE_REVOCABLE_FD_FOR_READS = properties.getBoolean(key,
                                DEFAULT_USE_REVOCABLE_FD_FOR_READS);
                        break;
                    case KEY_DELETE_ON_LAST_LEASE_DELAY_MS:
                        DELETE_ON_LAST_LEASE_DELAY_MS = properties.getLong(key,
                                DEFAULT_DELETE_ON_LAST_LEASE_DELAY_MS);
                        break;
                    default:
                        Slog.wtf(TAG, "Unknown key in device config properties: " + key);
                }
@@ -193,6 +207,9 @@ class BlobStoreConfig {
                    TimeUtils.formatDuration(DEFAULT_COMMIT_COOL_OFF_DURATION_MS)));
            fout.println(String.format(dumpFormat, KEY_USE_REVOCABLE_FD_FOR_READS,
                    USE_REVOCABLE_FD_FOR_READS, DEFAULT_USE_REVOCABLE_FD_FOR_READS));
            fout.println(String.format(dumpFormat, KEY_DELETE_ON_LAST_LEASE_DELAY_MS,
                    TimeUtils.formatDuration(DELETE_ON_LAST_LEASE_DELAY_MS),
                    TimeUtils.formatDuration(DEFAULT_DELETE_ON_LAST_LEASE_DELAY_MS)));
        }
    }

@@ -264,6 +281,13 @@ class BlobStoreConfig {
        return DeviceConfigProperties.USE_REVOCABLE_FD_FOR_READS;
    }

    /**
     * Returns the duration to wait before a blob is deleted, once the last lease on it is released.
     */
    public static long getDeletionOnLastLeaseDelayMs() {
        return DeviceConfigProperties.DELETE_ON_LAST_LEASE_DELAY_MS;
    }

    @Nullable
    public static File prepareBlobFile(long sessionId) {
        final File blobsDir = prepareBlobsDir();
+16 −3
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ import static com.android.server.blob.BlobStoreConfig.LOGV;
import static com.android.server.blob.BlobStoreConfig.TAG;
import static com.android.server.blob.BlobStoreConfig.XML_VERSION_CURRENT;
import static com.android.server.blob.BlobStoreConfig.getAdjustedCommitTimeMs;
import static com.android.server.blob.BlobStoreConfig.getDeletionOnLastLeaseDelayMs;
import static com.android.server.blob.BlobStoreSession.STATE_ABANDONED;
import static com.android.server.blob.BlobStoreSession.STATE_COMMITTED;
import static com.android.server.blob.BlobStoreSession.STATE_VERIFIED_INVALID;
@@ -488,12 +489,24 @@ public class BlobStoreManagerService extends SystemService {
                Slog.v(TAG, "Released lease on " + blobHandle
                        + "; callingUid=" + callingUid + ", callingPackage=" + callingPackage);
            }
            if (!blobMetadata.hasLeases()) {
                mHandler.postDelayed(() -> {
                    synchronized (mBlobsLock) {
                        // Check if blobMetadata object is still valid. If it is not, then
                        // it means that it was already deleted and nothing else to do here.
                        if (!Objects.equals(userBlobs.get(blobHandle), blobMetadata)) {
                            return;
                        }
                        if (blobMetadata.shouldBeDeleted(true /* respectLeaseWaitTime */)) {
                            deleteBlobLocked(blobMetadata);
                            userBlobs.remove(blobHandle);
                        }
                        writeBlobsInfoAsync();
                    }
                }, getDeletionOnLastLeaseDelayMs());
            }
            writeBlobsInfoAsync();
        }
    }

    private long getRemainingLeaseQuotaBytesInternal(int callingUid, String callingPackage) {
+1 −1
Original line number Diff line number Diff line
{
  "name": "com.android.extservices",
  "version": 300802200
  "version": 300802300
}
Loading