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

Commit 98fb8636 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5160973 from cc59ad6d to qt-release

Change-Id: If63ed8a6d9d2142981590711a739f7ad5b038afc
parents 664e5f46 cc59ad6d
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -26,6 +26,18 @@ mmm -j frameworks/native/cmds/dumpstate device/acme/secret_device/dumpstate/ har
mmm -j frameworks/native/cmds/dumpstate && adb push ${OUT}/system/bin/dumpstate system/bin && adb shell am bug-report
```

Make sure that the device is remounted before running the above command.
* If you're working with `userdebug` variant, you may need to run the following to remount your device:

  ```
  adb root && adb remount -R && adb wait-for-device && adb root && adb remount
  ```
* If you're working with `eng` variant, you may need to run the following to remount your device:

  ```
  adb root && adb remount
  ```

## To build, deploy, and run unit tests

First create `/data/nativetest64`:
@@ -37,13 +49,13 @@ adb shell mkdir /data/nativetest64
Then run:

```
mmm -j frameworks/native/cmds/dumpstate/ && adb push ${OUT}/data/nativetest64/dumpstate_test* /data/nativetest64 && adb shell /data/nativetest/dumpstate_test/dumpstate_test
mmm -j frameworks/native/cmds/dumpstate/ && adb push ${OUT}/data/nativetest64/dumpstate_test* /data/nativetest64 && adb shell /data/nativetest64/dumpstate_test/dumpstate_test
```

And to run just one test (for example, `DumpstateTest.RunCommandNoArgs`):

```
mmm -j frameworks/native/cmds/dumpstate/ && adb push ${OUT}/data/nativetest64/dumpstate_test* /data/nativetest64 && adb shell /data/nativetest/dumpstate_test/dumpstate_test --gtest_filter=DumpstateTest.RunCommandNoArgs
mmm -j frameworks/native/cmds/dumpstate/ && adb push ${OUT}/data/nativetest64/dumpstate_test* /data/nativetest64 && adb shell /data/nativetest64/dumpstate_test/dumpstate_test --gtest_filter=DumpstateTest.RunCommandNoArgs
```

## To take quick bugreports
+11 −0
Original line number Diff line number Diff line
@@ -1864,6 +1864,17 @@ static void FinalizeFile() {
            do_text_file = true;
        } else {
            do_text_file = false;
            // If the user has changed the suffix, we need to change the zip file name.
            std::string new_path = ds.GetPath(".zip");
            if (ds.path_ != new_path) {
                MYLOGD("Renaming zip file from %s to %s\n", ds.path_.c_str(), new_path.c_str());
                if (rename(ds.path_.c_str(), new_path.c_str())) {
                    MYLOGE("rename(%s, %s): %s\n", ds.path_.c_str(), new_path.c_str(),
                           strerror(errno));
                } else {
                    ds.path_ = new_path;
                }
            }
        }
    }
    if (do_text_file) {
+5 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ message SurfaceChange {
        OpaqueFlagChange            opaque_flag             = 13;
        SecureFlagChange            secure_flag             = 14;
        DeferredTransactionChange   deferred_transaction    = 15;
        CornerRadiusChange          corner_radius           = 16;
    }
}

@@ -62,6 +63,10 @@ message AlphaChange {
    required float alpha = 1;
}

message CornerRadiusChange {
    required float corner_radius = 1;
}

message LayerChange {
    required uint32 layer = 1;
}
+10 −0
Original line number Diff line number Diff line
@@ -385,6 +385,9 @@ status_t Replayer::doSurfaceTransaction(
            case SurfaceChange::SurfaceChangeCase::kCrop:
                setCrop(transaction, change.id(), change.crop());
                break;
            case SurfaceChange::SurfaceChangeCase::kCornerRadius:
                setCornerRadius(transaction, change.id(), change.corner_radius());
                break;
            case SurfaceChange::SurfaceChangeCase::kMatrix:
                setMatrix(transaction, change.id(), change.matrix());
                break;
@@ -489,6 +492,13 @@ void Replayer::setCrop(SurfaceComposerClient::Transaction& t,
    t.setCrop_legacy(mLayers[id], r);
}

void Replayer::setCornerRadius(SurfaceComposerClient::Transaction& t,
        layer_id id, const CornerRadiusChange& cc) {
    ALOGV("Layer %d: Setting Corner Radius -- cornerRadius=%d", id, cc.corner_radius());

    t.setCornerRadius(mLayers[id], cc.corner_radius());
}

void Replayer::setMatrix(SurfaceComposerClient::Transaction& t,
        layer_id id, const MatrixChange& mc) {
    ALOGV("Layer %d: Setting Matrix -- dsdx=%f, dtdx=%f, dsdy=%f, dtdy=%f", id, mc.dsdx(),
+2 −0
Original line number Diff line number Diff line
@@ -92,6 +92,8 @@ class Replayer {
            layer_id id, const LayerChange& lc);
    void setCrop(SurfaceComposerClient::Transaction& t,
            layer_id id, const CropChange& cc);
    void setCornerRadius(SurfaceComposerClient::Transaction& t,
            layer_id id, const CornerRadiusChange& cc);
    void setMatrix(SurfaceComposerClient::Transaction& t,
            layer_id id, const MatrixChange& mc);
    void setOverrideScalingMode(SurfaceComposerClient::Transaction& t,
Loading