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

Commit b1d388c7 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Revert "Use aidl::nullable for nullable type in C++"" into...

Merge "Revert "Use aidl::nullable for nullable type in C++"" into rvc-dev-plus-aosp am: 9beacac0 am: bd9b7af3 am: ec09e10c

Change-Id: I82f97aa26af94e4ecb72bfee7909905e6a18f9d8
parents 7c63c9f8 ec09e10c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -113,7 +113,7 @@ Status Idmap2Service::verifyIdmap(const std::string& overlay_apk_path,
Status Idmap2Service::createIdmap(const std::string& target_apk_path,
                                  const std::string& overlay_apk_path, int32_t fulfilled_policies,
                                  bool enforce_overlayable, int32_t user_id ATTRIBUTE_UNUSED,
                                  aidl::nullable<std::string>* _aidl_return) {
                                  std::optional<std::string>* _aidl_return) {
  assert(_aidl_return);
  SYSTRACE << "Idmap2Service::createIdmap " << target_apk_path << " " << overlay_apk_path;
  _aidl_return->reset();
@@ -155,7 +155,7 @@ Status Idmap2Service::createIdmap(const std::string& target_apk_path,
    return error("failed to write to idmap path " + idmap_path);
  }

  *_aidl_return = aidl::make_nullable<std::string>(idmap_path);
  *_aidl_return = idmap_path;
  return ok();
}

+4 −2
Original line number Diff line number Diff line
@@ -19,7 +19,9 @@

#include <android-base/unique_fd.h>
#include <binder/BinderService.h>
#include <binder/Nullable.h>

#include <optional>
#include <string>

#include "android/os/BnIdmap2.h"

@@ -44,7 +46,7 @@ class Idmap2Service : public BinderService<Idmap2Service>, public BnIdmap2 {
  binder::Status createIdmap(const std::string& target_apk_path,
                             const std::string& overlay_apk_path, int32_t fulfilled_policies,
                             bool enforce_overlayable, int32_t user_id,
                             aidl::nullable<std::string>* _aidl_return) override;
                             std::optional<std::string>* _aidl_return) override;
};

}  // namespace android::os
+1 −2
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@
#include <androidfw/ZipFileRO.h>
#include <androidfw/ZipUtils.h>
#include <binder/BinderService.h>
#include <binder/Nullable.h>
#include <binder/ParcelFileDescriptor.h>
#include <binder/Status.h>
#include <sys/stat.h>
@@ -1084,7 +1083,7 @@ bool IncrementalService::prepareDataLoader(IncrementalService::IncFsMount& ifs,
        return false;
    }
    FileSystemControlParcel fsControlParcel;
    fsControlParcel.incremental = aidl::make_nullable<IncrementalFileSystemControlParcel>();
    fsControlParcel.incremental = IncrementalFileSystemControlParcel();
    fsControlParcel.incremental->cmd.reset(base::unique_fd(::dup(ifs.control.cmd)));
    fsControlParcel.incremental->pendingReads.reset(
            base::unique_fd(::dup(ifs.control.pendingReads)));