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

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

Snap for 4981759 from 27fcf48f to qt-release

Change-Id: I7199fd2c7e30a003db6ad0d9567adf3ade3d40f5
parents 4f686d37 27fcf48f
Loading
Loading
Loading
Loading
+39 −9
Original line number Diff line number Diff line
@@ -95,15 +95,6 @@ static constexpr int kVerityPageSize = 4096;
static constexpr size_t kSha256Size = 32;
static constexpr const char* kPropApkVerityMode = "ro.apk_verity.mode";

// NOTE: keep in sync with Installer
static constexpr int FLAG_CLEAR_CACHE_ONLY = 1 << 8;
static constexpr int FLAG_CLEAR_CODE_CACHE_ONLY = 1 << 9;
static constexpr int FLAG_USE_QUOTA = 1 << 12;
static constexpr int FLAG_FREE_CACHE_V2 = 1 << 13;
static constexpr int FLAG_FREE_CACHE_V2_DEFY_QUOTA = 1 << 14;
static constexpr int FLAG_FREE_CACHE_NOOP = 1 << 15;
static constexpr int FLAG_FORCE = 1 << 16;

namespace {

constexpr const char* kDump = "android.permission.DUMP";
@@ -613,6 +604,31 @@ binder::Status InstalldNativeService::clearAppData(const std::unique_ptr<std::st
                remove_path_xattr(path, kXattrInodeCodeCache);
            }
        }

        auto extPath = findDataMediaPath(uuid, userId);
        if (flags & FLAG_CLEAR_CACHE_ONLY) {
            // Clear only cached data from shared storage
            path = StringPrintf("%s/Android/data/%s/cache", extPath.c_str(), pkgname);
            if (delete_dir_contents(path, true) != 0) {
                res = error("Failed to delete contents of " + path);
            }
        } else if (flags & FLAG_CLEAR_CODE_CACHE_ONLY) {
            // No code cache on shared storage
        } else {
            // Clear everything on shared storage
            path = StringPrintf("%s/Android/data/%s", extPath.c_str(), pkgname);
            if (delete_dir_contents(path, true) != 0) {
                res = error("Failed to delete contents of " + path);
            }
            path = StringPrintf("%s/Android/media/%s", extPath.c_str(), pkgname);
            if (delete_dir_contents(path, true) != 0) {
                res = error("Failed to delete contents of " + path);
            }
            path = StringPrintf("%s/Android/obb/%s", extPath.c_str(), pkgname);
            if (delete_dir_contents(path, true) != 0) {
                res = error("Failed to delete contents of " + path);
            }
        }
    }
    if (flags & FLAG_STORAGE_DE) {
        std::string suffix = "";
@@ -681,6 +697,20 @@ binder::Status InstalldNativeService::destroyAppData(const std::unique_ptr<std::
        if (delete_dir_contents_and_dir(path) != 0) {
            res = error("Failed to delete " + path);
        }

        auto extPath = findDataMediaPath(uuid, userId);
        path = StringPrintf("%s/Android/data/%s", extPath.c_str(), pkgname);
        if (delete_dir_contents_and_dir(path, true) != 0) {
            res = error("Failed to delete " + path);
        }
        path = StringPrintf("%s/Android/media/%s", extPath.c_str(), pkgname);
        if (delete_dir_contents_and_dir(path, true) != 0) {
            res = error("Failed to delete " + path);
        }
        path = StringPrintf("%s/Android/obb/%s", extPath.c_str(), pkgname);
        if (delete_dir_contents_and_dir(path, true) != 0) {
            res = error("Failed to delete " + path);
        }
    }
    if (flags & FLAG_STORAGE_DE) {
        auto path = create_data_user_de_package_path(uuid_, userId, pkgname);
+13 −0
Original line number Diff line number Diff line
@@ -102,4 +102,17 @@ interface IInstalld {
    boolean prepareAppProfile(@utf8InCpp String packageName,
        int userId, int appId, @utf8InCpp String profileName, @utf8InCpp String codePath,
        @nullable @utf8InCpp String dexMetadata);

    const int FLAG_STORAGE_DE = 0x1;
    const int FLAG_STORAGE_CE = 0x2;

    const int FLAG_CLEAR_CACHE_ONLY = 0x10;
    const int FLAG_CLEAR_CODE_CACHE_ONLY = 0x20;

    const int FLAG_FREE_CACHE_V2 = 0x100;
    const int FLAG_FREE_CACHE_V2_DEFY_QUOTA = 0x200;
    const int FLAG_FREE_CACHE_NOOP = 0x400;

    const int FLAG_USE_QUOTA = 0x1000;
    const int FLAG_FORCE = 0x2000;
}
+4 −0
Original line number Diff line number Diff line
@@ -318,6 +318,10 @@ void layer_state_t::merge(const layer_state_t& other) {
        what |= eSidebandStreamChanged;
        sidebandStream = other.sidebandStream;
    }

    if (other.what != what) {
        ALOGE("Unmerged SurfaceComposer Transaction properties. LayerState::merge needs updating?");
    }
}

}; // namespace android
+1 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ public:
        eFXSurfaceBufferQueue = 0x00000000,
        eFXSurfaceColor = 0x00020000,
        eFXSurfaceBufferState = 0x00040000,
        eFXSurfaceContainer = 0x00080000,
        eFXSurfaceMask = 0x000F0000,
    };

+7 −5
Original line number Diff line number Diff line
@@ -25,6 +25,8 @@
#include <ui/Rect.h>
#include <utils/Flattenable.h>

#include <android-base/macros.h>

namespace android {
// ---------------------------------------------------------------------------

@@ -93,11 +95,11 @@ public:
            Region&     subtractSelf(const Region& rhs, int dx, int dy);

            // these translate rhs first
    const   Region      translate(int dx, int dy) const;
    const   Region      merge(const Region& rhs, int dx, int dy) const;
    const   Region      mergeExclusive(const Region& rhs, int dx, int dy) const;
    const   Region      intersect(const Region& rhs, int dx, int dy) const;
    const   Region      subtract(const Region& rhs, int dx, int dy) const;
    const   Region      translate(int dx, int dy) const WARN_UNUSED;
    const   Region      merge(const Region& rhs, int dx, int dy) const WARN_UNUSED;
    const   Region      mergeExclusive(const Region& rhs, int dx, int dy) const WARN_UNUSED;
    const   Region      intersect(const Region& rhs, int dx, int dy) const WARN_UNUSED;
    const   Region      subtract(const Region& rhs, int dx, int dy) const WARN_UNUSED;

    // convenience operators overloads
    inline  const Region      operator | (const Region& rhs) const;
Loading