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

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

Snap for 6617762 from 7bf84ecb to rvc-release

Change-Id: I2601dfb3a00cd1fe368ae543efec586de69fba64
parents 50aa3b5e 7bf84ecb
Loading
Loading
Loading
Loading
+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) {
+2 −1
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ java_sdk_library {
    visibility: [
        "//frameworks/base", // Framework
        "//frameworks/base/apex/statsd:__subpackages__", // statsd apex
        "//frameworks/base/packages/Tethering", // Tethering
        "//frameworks/opt/net/wifi/service", // wifi service
        "//packages/providers/MediaProvider", // MediaProvider apk
    ],
+1 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ package android {
  }

  public static final class R.bool {
    field public static final int config_assistantOnTopOfDream = 17891333; // 0x1110005
    field public static final int config_perDisplayFocusEnabled = 17891332; // 0x1110004
  }

+13 −0
Original line number Diff line number Diff line
@@ -486,6 +486,7 @@ message Atom {
        KeystoreKeyEventReported keystore_key_event_reported = 302;
        NetworkTetheringReported  network_tethering_reported =
            303 [(module) = "network_tethering"];
        ImeTouchReported ime_touch_reported = 304 [(module) = "sysui"];

        // StatsdStats tracks platform atoms with ids upto 500.
        // Update StatsdStats::kMaxPushedAtomId when atom ids here approach that value.
@@ -3060,6 +3061,18 @@ message ExclusionRectStateChanged {
    optional int32 duration_millis = 7;
}

/**
 * Logs when IME is on.
 *
 * Logged from: /packages/SystemUI/src/com/android/systemui/
                statusbar/phone/NavigationBarView.java
 *
 */
message ImeTouchReported {
    optional int32 x_coordinate = 1;  // X coordinate for ACTION_DOWN event.
    optional int32 y_coordinate = 2;  // Y coordinate for ACTION_DOWN event.
}

/**
 * Logs when Launcher (HomeScreen) UI has changed or was interacted.
 *
Loading