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

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

Snap for 6050516 from b6d05431 to rvc-release

Change-Id: Ia077e7b27304cdd6c2d282e8def2c504a1650940
parents 0f6f7184 b6d05431
Loading
Loading
Loading
Loading

TEST_MAPPING

0 → 100644
+63 −0
Original line number Diff line number Diff line
{
  "presubmit": [
    {
      "name": "SurfaceFlinger_test",
      "options": [
        {
          "include-filter": "*CredentialsTest.*"
        },
        {
          "include-filter": "*SurfaceFlingerStress.*"
        },
        {
          "include-filter": "*SurfaceInterceptorTest.*"
        },
        {
          "include-filter": "*LayerTransactionTest.*"
        },
        {
          "include-filter": "*LayerTypeTransactionTest.*"
        },
        {
          "include-filter": "*LayerUpdateTest.*"
        },
        {
          "include-filter": "*GeometryLatchingTest.*"
        },
        {
          "include-filter": "*CropLatchingTest.*"
        },
        {
          "include-filter": "*ChildLayerTest.*"
        },
        {
          "include-filter": "*ScreenCaptureTest.*"
        },
        {
          "include-filter": "*ScreenCaptureChildOnlyTest.*"
        },
        {
          "include-filter": "*DereferenceSurfaceControlTest.*"
        },
        {
          "include-filter": "*BoundlessLayerTest.*"
        },
        {
          "include-filter": "*MultiDisplayLayerBoundsTest.*"
        },
        {
          "include-filter": "*InvalidHandleTest.*"
        },
        {
          "include-filter": "*VirtualDisplayTest.*"
        },
        {
          "include-filter": "*RelativeZTest.*"
        }
      ]
    },
    {
      "name": "libsurfaceflinger_unittest"
    }
  ]
}
+41 −14
Original line number Diff line number Diff line
@@ -97,6 +97,7 @@ static constexpr const char* CODE_CACHE_DIR_POSTFIX = "/code_cache";
static constexpr int kVerityPageSize = 4096;
static constexpr size_t kSha256Size = 32;
static constexpr const char* kPropApkVerityMode = "ro.apk_verity.mode";
static constexpr const char* kFuseProp = "persist.sys.fuse";

namespace {

@@ -588,12 +589,21 @@ binder::Status InstalldNativeService::clearAppData(const std::unique_ptr<std::st
        std::lock_guard<std::recursive_mutex> lock(mMountsLock);
        for (const auto& n : mStorageMounts) {
            auto extPath = n.second;

            if (android::base::GetBoolProperty(kFuseProp, false)) {
                std::regex re("^\\/mnt\\/pass_through\\/[0-9]+\\/emulated");
                if (std::regex_match(extPath, re)) {
                    extPath += "/" + std::to_string(userId);
                }
            } else {
                if (n.first.compare(0, 14, "/mnt/media_rw/") != 0) {
                    extPath += StringPrintf("/%d", userId);
                } else if (userId != 0) {
                    // TODO: support devices mounted under secondary users
                    continue;
                }
            }

            if (flags & FLAG_CLEAR_CACHE_ONLY) {
                // Clear only cached data from shared storage
                auto path = StringPrintf("%s/Android/data/%s/cache", extPath.c_str(), pkgname);
@@ -684,16 +694,26 @@ binder::Status InstalldNativeService::destroyAppData(const std::unique_ptr<std::
        std::lock_guard<std::recursive_mutex> lock(mMountsLock);
        for (const auto& n : mStorageMounts) {
            auto extPath = n.second;

            if (android::base::GetBoolProperty(kFuseProp, false)) {
                std::regex re("^\\/mnt\\/pass_through\\/[0-9]+\\/emulated");
                if (std::regex_match(extPath, re)) {
                    extPath += "/" + std::to_string(userId);
                }
            } else {
                if (n.first.compare(0, 14, "/mnt/media_rw/") != 0) {
                    extPath += StringPrintf("/%d", userId);
                } else if (userId != 0) {
                    // TODO: support devices mounted under secondary users
                    continue;
                }
            }

            auto path = StringPrintf("%s/Android/data/%s", extPath.c_str(), pkgname);
            if (delete_dir_contents_and_dir(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_and_dir(path, true) != 0) {
                res = error("Failed to delete contents of " + path);
@@ -2574,6 +2594,12 @@ binder::Status InstalldNativeService::invalidateMounts() {
        std::getline(in, target, ' ');
        std::getline(in, ignored);

        if (android::base::GetBoolProperty(kFuseProp, false)) {
            if (target.compare(0, 17, "/mnt/pass_through") == 0) {
                LOG(DEBUG) << "Found storage mount " << source << " at " << target;
                mStorageMounts[source] = target;
            }
        } else {
#if !BYPASS_SDCARDFS
            if (target.compare(0, 21, "/mnt/runtime/default/") == 0) {
                LOG(DEBUG) << "Found storage mount " << source << " at " << target;
@@ -2581,6 +2607,7 @@ binder::Status InstalldNativeService::invalidateMounts() {
            }
#endif
        }
    }
    return ok();
}

include/binder

deleted120000 → 0
+0 −1
Original line number Diff line number Diff line
../libs/binder/include/binder/
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
../../libs/binder/include/binder/ActivityManager.h
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
../../libs/binder/include/binder/AppOpsManager.h
 No newline at end of file
Loading