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

Commit 1ca32b91 authored by Daniel Wang's avatar Daniel Wang
Browse files

Revert "Add Winscope Magic Number to ViewCapture data output."

Revert submission 23545138

Reason for revert: DroidMonitor: Potential culprit for Bug b/287509119 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Reverted changes: /q/submissionid:23545138

Change-Id: I1cc9e3e9e196ae67cf8ba5fe7cd1e16635ccf504
parent eb297699
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -16,9 +16,6 @@

package com.android.app.viewcapture;

import static com.android.app.viewcapture.data.ExportedData.MagicNumber.MAGIC_NUMBER_H;
import static com.android.app.viewcapture.data.ExportedData.MagicNumber.MAGIC_NUMBER_L;

import android.content.Context;
import android.content.res.Resources;
import android.media.permission.SafeCloseable;
@@ -68,9 +65,6 @@ public abstract class ViewCapture {
    private static final int PFLAG_INVALIDATED = 0x80000000;
    private static final int PFLAG_DIRTY_MASK = 0x00200000;

    private static final long MAGIC_NUMBER_FOR_WINSCOPE =
            ((long) MAGIC_NUMBER_H.getNumber() << 32) | MAGIC_NUMBER_L.getNumber();

    // Number of frames to keep in memory
    private final int mMemorySize;
    protected static final int DEFAULT_MEMORY_SIZE = 2000;
@@ -185,7 +179,6 @@ public abstract class ViewCapture {
            throws InterruptedException, ExecutionException {
        ArrayList<Class> classList = new ArrayList<>();
        return ExportedData.newBuilder()
                .setMagicNumber(MAGIC_NUMBER_FOR_WINSCOPE)
                .setPackage(context.getPackageName())
                .addAllWindowData(getWindowData(context, classList, l -> l.mIsActive).get())
                .addAllClassname(toStringList(classList))
+3 −13
Original line number Diff line number Diff line
@@ -21,19 +21,9 @@ package com.android.app.viewcapture.data;
option java_multiple_files = true;

message ExportedData {
  /* constant; MAGIC_NUMBER = (long) MAGIC_NUMBER_H << 32 | MagicNumber.MAGIC_NUMBER_L
   (this is needed because enums have to be 32 bits and there's no nice way to put 64bit
    constants into .proto files. */
  enum MagicNumber {
    INVALID = 0;
    MAGIC_NUMBER_L = 0x65906578;  /* AZAN (ASCII) */
    MAGIC_NUMBER_H = 0x68658273;  /* DARI (ASCII) */
  }

  optional fixed64 magic_number = 1;  /* Must be the first field, set to value in MagicNumber */
  repeated WindowData windowData = 2;
  optional string package = 3;
  repeated string classname = 4;
  repeated WindowData windowData = 1;
  optional string package = 2;
  repeated string classname = 3;
}

message WindowData {