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

Commit 143febbf authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 7563534 from 5be998a6 to sc-release

Change-Id: Ib3e0a2aff162062702c6aecbbc49d9f5813cd74c
parents 2ffa199a 5be998a6
Loading
Loading
Loading
Loading
+4062 −2382

File changed.

Preview size limit exceeded, changes collapsed.

+3 −19
Original line number Diff line number Diff line
@@ -191,6 +191,7 @@ android.app.ActivityOptions$1
android.app.ActivityOptions$2
android.app.ActivityOptions
android.app.ActivityTaskManager$1
android.app.ActivityTaskManager$RootTaskInfo
android.app.ActivityTaskManager
android.app.ActivityThread$1
android.app.ActivityThread$ActivityClientRecord
@@ -589,6 +590,7 @@ android.app.SystemServiceRegistry$119
android.app.SystemServiceRegistry$11
android.app.SystemServiceRegistry$120
android.app.SystemServiceRegistry$121
android.app.SystemServiceRegistry$123
android.app.SystemServiceRegistry$12
android.app.SystemServiceRegistry$13
android.app.SystemServiceRegistry$14
@@ -1624,7 +1626,6 @@ android.content.pm.parsing.component.ParsedComponent
android.content.pm.parsing.component.ParsedInstrumentation$1
android.content.pm.parsing.component.ParsedInstrumentation
android.content.pm.parsing.component.ParsedInstrumentationUtils
android.content.pm.parsing.component.ParsedIntentInfo$1
android.content.pm.parsing.component.ParsedIntentInfo$ListParceler
android.content.pm.parsing.component.ParsedIntentInfo$Parceler
android.content.pm.parsing.component.ParsedIntentInfo
@@ -2325,6 +2326,7 @@ android.hardware.contexthub.V1_0.IContexthubCallback
android.hardware.contexthub.V1_0.MemRange
android.hardware.contexthub.V1_0.NanoAppBinary
android.hardware.contexthub.V1_0.PhysicalSensor
android.hardware.devicestate.DeviceStateManager
android.hardware.display.AmbientBrightnessDayStats$1
android.hardware.display.AmbientBrightnessDayStats
android.hardware.display.AmbientDisplayConfiguration
@@ -9477,8 +9479,6 @@ com.android.internal.telephony.NitzData
com.android.internal.telephony.NitzStateMachine$DeviceState
com.android.internal.telephony.NitzStateMachine$DeviceStateImpl
com.android.internal.telephony.NitzStateMachine
com.android.internal.telephony.OemHookIndication
com.android.internal.telephony.OemHookResponse
com.android.internal.telephony.OperatorInfo$1
com.android.internal.telephony.OperatorInfo$State
com.android.internal.telephony.OperatorInfo
@@ -10454,22 +10454,6 @@ com.android.internal.telephony.util.SMSDispatcherUtil
com.android.internal.telephony.util.TelephonyUtils
com.android.internal.telephony.util.VoicemailNotificationSettingsUtil
com.android.internal.telephony.util.XmlUtils
com.android.internal.telephony.vendor.VendorGsmCdmaPhone
com.android.internal.telephony.vendor.VendorMultiSimSettingController
com.android.internal.telephony.vendor.VendorPhoneSwitcher$1
com.android.internal.telephony.vendor.VendorPhoneSwitcher$2
com.android.internal.telephony.vendor.VendorPhoneSwitcher$DdsSwitchState
com.android.internal.telephony.vendor.VendorPhoneSwitcher
com.android.internal.telephony.vendor.VendorServiceStateTracker
com.android.internal.telephony.vendor.VendorSubscriptionController
com.android.internal.telephony.vendor.VendorSubscriptionInfoUpdater
com.android.internal.telephony.vendor.dataconnection.VendorDataResetEventTracker$1
com.android.internal.telephony.vendor.dataconnection.VendorDataResetEventTracker$2
com.android.internal.telephony.vendor.dataconnection.VendorDataResetEventTracker$3
com.android.internal.telephony.vendor.dataconnection.VendorDataResetEventTracker$ResetEventListener
com.android.internal.telephony.vendor.dataconnection.VendorDataResetEventTracker
com.android.internal.telephony.vendor.dataconnection.VendorDcTracker$1
com.android.internal.telephony.vendor.dataconnection.VendorDcTracker
com.android.internal.textservice.ISpellCheckerService$Stub$Proxy
com.android.internal.textservice.ISpellCheckerService$Stub
com.android.internal.textservice.ISpellCheckerService
+2 −1
Original line number Diff line number Diff line
@@ -14,12 +14,13 @@
 * limitations under the License.
 */

#include "idmap2/CommandUtils.h"

#include <fstream>
#include <memory>
#include <string>
#include <vector>

#include "idmap2/CommandUtils.h"
#include "idmap2/Idmap.h"
#include "idmap2/Result.h"
#include "idmap2/SysTrace.h"
+29 −6
Original line number Diff line number Diff line
@@ -297,17 +297,40 @@ Status Idmap2Service::createFabricatedOverlay(
  return ok();
}

Status Idmap2Service::getFabricatedOverlayInfos(
Status Idmap2Service::acquireFabricatedOverlayIterator() {
  if (frro_iter_.has_value()) {
    LOG(WARNING) << "active ffro iterator was not previously released";
  }
  frro_iter_ = std::filesystem::directory_iterator(kIdmapCacheDir);
  return ok();
}

Status Idmap2Service::releaseFabricatedOverlayIterator() {
  if (!frro_iter_.has_value()) {
    LOG(WARNING) << "no active ffro iterator to release";
  }
  return ok();
}

Status Idmap2Service::nextFabricatedOverlayInfos(
    std::vector<os::FabricatedOverlayInfo>* _aidl_return) {
  for (const auto& entry : std::filesystem::directory_iterator(kIdmapCacheDir)) {
    if (!android::IsFabricatedOverlay(entry.path())) {
  constexpr size_t kMaxEntryCount = 100;
  if (!frro_iter_.has_value()) {
    return error("no active frro iterator");
  }

  size_t count = 0;
  auto& entry_iter = *frro_iter_;
  auto entry_iter_end = end(*frro_iter_);
  for (; entry_iter != entry_iter_end && count < kMaxEntryCount; ++entry_iter) {
    auto& entry = *entry_iter;
    if (!entry.is_regular_file() || !android::IsFabricatedOverlay(entry.path())) {
      continue;
    }

    const auto overlay = FabricatedOverlayContainer::FromPath(entry.path());
    if (!overlay) {
      // This is a sign something went wrong.
      LOG(ERROR) << "Failed to open '" << entry.path() << "': " << overlay.GetErrorMessage();
      LOG(WARNING) << "Failed to open '" << entry.path() << "': " << overlay.GetErrorMessage();
      continue;
    }

@@ -319,8 +342,8 @@ Status Idmap2Service::getFabricatedOverlayInfos(
    out_info.targetOverlayable = info.target_name;
    out_info.path = entry.path();
    _aidl_return->emplace_back(std::move(out_info));
    count++;
  }

  return ok();
}

+7 −2
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
#include <idmap2/ResourceContainer.h>
#include <idmap2/Result.h>

#include <filesystem>
#include <memory>
#include <string>
#include <vector>
@@ -59,7 +60,11 @@ class Idmap2Service : public BinderService<Idmap2Service>, public BnIdmap2 {
  binder::Status deleteFabricatedOverlay(const std::string& overlay_path,
                                         bool* _aidl_return) override;

  binder::Status getFabricatedOverlayInfos(
  binder::Status acquireFabricatedOverlayIterator() override;

  binder::Status releaseFabricatedOverlayIterator() override;

  binder::Status nextFabricatedOverlayInfos(
      std::vector<os::FabricatedOverlayInfo>* _aidl_return) override;

  binder::Status dumpIdmap(const std::string& overlay_path, std::string* _aidl_return) override;
@@ -69,7 +74,7 @@ class Idmap2Service : public BinderService<Idmap2Service>, public BnIdmap2 {
  // be able to be recalculated if idmap2 dies and restarts.
  std::unique_ptr<idmap2::TargetResourceContainer> framework_apk_cache_;

  std::vector<os::FabricatedOverlayInfo> fabricated_overlays_;
  std::optional<std::filesystem::directory_iterator> frro_iter_;

  template <typename T>
  using MaybeUniquePtr = std::variant<std::unique_ptr<T>, T*>;
Loading