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

Commit b59a38d3 authored by Josh Gao's avatar Josh Gao Committed by Gerrit Code Review
Browse files

Merge "Add feature flag for b/110953234 fix."

parents 74cdc8a5 fb085107
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -894,7 +894,8 @@ static bool copy_local_dir_remote(SyncConnection& sc, std::string lpath,
    //
    // TODO(b/25457350): We don't preserve permissions on directories.
    // TODO: Find all of the leaves and `mkdir -p` them instead?
    if (CanUseFeature(sc.Features(), kFeatureShell2)) {
    if (!CanUseFeature(sc.Features(), kFeatureFixedPushMkdir) &&
        CanUseFeature(sc.Features(), kFeatureShell2)) {
        SilentStandardStreamsCallbackInterface cb;
        std::string cmd = "mkdir";
        for (const auto& dir : directory_list) {
+1 −1
Original line number Diff line number Diff line
@@ -750,7 +750,7 @@ class FileOperationsTest(DeviceTest):
            if host_dir is not None:
                shutil.rmtree(host_dir)

    def test_push_empty(self):
    def disabled_test_push_empty(self):
        """Push an empty directory to the device."""
        self.device.shell(['rm', '-rf', self.DEVICE_TEMP_DIR])
        self.device.shell(['mkdir', self.DEVICE_TEMP_DIR])
+2 −1
Original line number Diff line number Diff line
@@ -67,6 +67,7 @@ const char* const kFeatureStat2 = "stat_v2";
const char* const kFeatureLibusb = "libusb";
const char* const kFeaturePushSync = "push_sync";
const char* const kFeatureApex = "apex";
const char* const kFeatureFixedPushMkdir = "fixed_push_mkdir";

namespace {

@@ -1008,7 +1009,7 @@ size_t atransport::get_max_payload() const {
const FeatureSet& supported_features() {
    // Local static allocation to avoid global non-POD variables.
    static const FeatureSet* features = new FeatureSet{
        kFeatureShell2, kFeatureCmd, kFeatureStat2,
        kFeatureShell2, kFeatureCmd, kFeatureStat2, kFeatureFixedPushMkdir,
#if ADB_HOST
                kFeatureApex
#endif
+4 −2
Original line number Diff line number Diff line
@@ -57,10 +57,12 @@ extern const char* const kFeatureCmd;
extern const char* const kFeatureStat2;
// The server is running with libusb enabled.
extern const char* const kFeatureLibusb;
// The server supports `push --sync`.
// adbd supports `push --sync`.
extern const char* const kFeaturePushSync;
// The server supports installing .apex packages.
// adbd supports installing .apex packages.
extern const char* const kFeatureApex;
// adbd has b/110953234 fixed.
extern const char* const kFeatureFixedPushMkdir;

TransportId NextTransportId();