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

Commit 325b8c94 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Method to test for quota support.

Framework logic needs to change its behavior depending on how quickly
disk usage calculations can be performed.

Test: builds, boots
Bug: 34690590
Change-Id: I6139d1ea6a6084b1fd42062e2032ec9f515f6d98
parent 1dc50630
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2014,5 +2014,11 @@ std::string InstalldNativeService::findQuotaDeviceForUuid(
    return mQuotaDevices[path];
}

binder::Status InstalldNativeService::isQuotaSupported(
        const std::unique_ptr<std::string>& volumeUuid, bool* _aidl_return) {
    *_aidl_return = !findQuotaDeviceForUuid(volumeUuid).empty();
    return ok();
}

}  // namespace installd
}  // namespace android
+2 −0
Original line number Diff line number Diff line
@@ -111,6 +111,8 @@ public:
        const std::unique_ptr<std::string>& volumeUuid, int32_t storage_flag, bool* _aidl_return);

    binder::Status invalidateMounts();
    binder::Status isQuotaSupported(const std::unique_ptr<std::string>& volumeUuid,
            bool* _aidl_return);

private:
    std::recursive_mutex mLock;
+1 −0
Original line number Diff line number Diff line
@@ -77,4 +77,5 @@ interface IInstalld {
        int storage_flag);

    void invalidateMounts();
    boolean isQuotaSupported(@nullable @utf8InCpp String uuid);
}