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

Commit ac345f85 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Don't depend on String8 cast to C string" into main am: 41363ba9 am:...

Merge "Don't depend on String8 cast to C string" into main am: 41363ba9 am: d001ea5b am: 834467bd am: de14ea19 am: 7a976b65

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2748044



Change-Id: Id23e30ebeec4ddefc589a208bf5925cb2fa1816c
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 6905298a 7a976b65
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1834,7 +1834,7 @@ BootAnimation::Animation* BootAnimation::loadAnimation(const String8& fn) {
            fn.c_str());
        return nullptr;
    }
    ZipFileRO *zip = ZipFileRO::open(fn);
    ZipFileRO *zip = ZipFileRO::open(fn.c_str());
    if (zip == nullptr) {
        SLOGE("Failed to open animation zip \"%s\": %s",
            fn.c_str(), strerror(errno));
+1 −1
Original line number Diff line number Diff line
@@ -94,7 +94,7 @@ void PrintValue(AssetManager2* const am, const AssetManager2::SelectedValue& val
      const ResStringPool* pool = am->GetStringPoolForCookie(value.cookie);
      out->append("\"");
      if (auto str = pool->string8ObjectAt(value.data); str.ok()) {
        out->append(*str);
        out->append(str->c_str());
      }
    } break;
    default:
+1 −1
Original line number Diff line number Diff line
@@ -567,7 +567,7 @@ status_t IncidentService::command(FILE* in, FILE* out, FILE* err, Vector<String8
                fprintf(out, "Not enough arguments for section\n");
                return NO_ERROR;
            }
            int id = atoi(args[1]);
            int id = atoi(args[1].c_str());
            int idx = 0;
            while (SECTION_LIST[idx] != NULL) {
                const Section* section = SECTION_LIST[idx];
+6 −6
Original line number Diff line number Diff line
@@ -812,10 +812,10 @@ Asset* AssetManager::openNonAssetInPathLocked(const char* fileName, AccessMode m
        /* check the appropriate Zip file */
        ZipFileRO* pZip = getZipFileLocked(ap);
        if (pZip != NULL) {
            ALOGV("GOT zip, checking NA '%s'", (const char*) path);
            ALOGV("GOT zip, checking NA '%s'", path.c_str());
            ZipEntryRO entry = pZip->findEntryByName(path.c_str());
            if (entry != NULL) {
                ALOGV("FOUND NA in Zip file for %s", (const char*) path);
                ALOGV("FOUND NA in Zip file for %s", path.c_str());
                pAsset = openAssetFromZipLocked(pZip, entry, mode, path);
                pZip->releaseEntry(entry);
            }
@@ -1425,7 +1425,7 @@ AssetManager::SharedZip::SharedZip(const String8& path, time_t modWhen)
      mResourceTableAsset(NULL), mResourceTable(NULL)
{
    if (kIsDebug) {
        ALOGI("Creating SharedZip %p %s\n", this, (const char*)mPath);
        ALOGI("Creating SharedZip %p %s\n", this, mPath.c_str());
    }
    ALOGV("+++ opening zip '%s'\n", mPath.c_str());
    mZipFile = ZipFileRO::open(mPath.c_str());
@@ -1439,7 +1439,7 @@ AssetManager::SharedZip::SharedZip(int fd, const String8& path)
      mResourceTableAsset(NULL), mResourceTable(NULL)
{
    if (kIsDebug) {
        ALOGI("Creating SharedZip %p fd=%d %s\n", this, fd, (const char*)mPath);
        ALOGI("Creating SharedZip %p fd=%d %s\n", this, fd, mPath.c_str());
    }
    ALOGV("+++ opening zip fd=%d '%s'\n", fd, mPath.c_str());
    mZipFile = ZipFileRO::openFd(fd, mPath.c_str());
@@ -1453,7 +1453,7 @@ sp<AssetManager::SharedZip> AssetManager::SharedZip::get(const String8& path,
        bool createIfNotPresent)
{
    AutoMutex _l(gLock);
    time_t modWhen = getFileModDate(path);
    time_t modWhen = getFileModDate(path.c_str());
    sp<SharedZip> zip = gOpen.valueFor(path).promote();
    if (zip != NULL && zip->mModWhen == modWhen) {
        return zip;
@@ -1541,7 +1541,7 @@ bool AssetManager::SharedZip::getOverlay(size_t idx, asset_path* out) const
AssetManager::SharedZip::~SharedZip()
{
    if (kIsDebug) {
        ALOGI("Destroying SharedZip %p %s\n", this, (const char*)mPath);
        ALOGI("Destroying SharedZip %p %s\n", this, mPath.c_str());
    }
    if (mResourceTable != NULL) {
        delete mResourceTable;
+1 −1
Original line number Diff line number Diff line
@@ -1026,7 +1026,7 @@ std::string AssetManager2::GetLastResourceResolution() const {

  log_stream << "\nBest matching is from "
             << (last_resolution_.best_config_name.empty() ? "default"
                                                   : last_resolution_.best_config_name)
                    : last_resolution_.best_config_name.c_str())
             << " configuration of " << last_resolution_.best_package_name;
  return log_stream.str();
}
Loading