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

Commit 2a5d4916 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5558509 from c8522b9b to qt-release

Change-Id: I188c52c4a885600dd2bff2bc695a9f1c49ff6449
parents 31a7d438 c8522b9b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -602,6 +602,7 @@ java_defaults {
        "telephony/java/com/android/ims/ImsConfigListener.aidl",
        "telephony/java/com/android/internal/telephony/IApnSourceService.aidl",
        "telephony/java/com/android/internal/telephony/ICarrierConfigLoader.aidl",
        "telephony/java/com/android/internal/telephony/IIntegerConsumer.aidl",
        "telephony/java/com/android/internal/telephony/IMms.aidl",
        "telephony/java/com/android/internal/telephony/INumberVerificationCallback.aidl",
        "telephony/java/com/android/internal/telephony/IOnSubscriptionsChangedListener.aidl",
+1 −0
Original line number Diff line number Diff line
@@ -251,6 +251,7 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/framework/com.android.media.
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/priv-app/SystemUI)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/media/audio)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/priv-app/DynamicAndroidInstallationService)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/priv-app/DefaultContainerService)
# ******************************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST ABOVE THIS BANNER
# ******************************************************************
+7 −53
Original line number Diff line number Diff line
@@ -86,20 +86,6 @@ static sk_sp<SkColorSpace> dataSpaceToColorSpace(ui::Dataspace d)
    }
}

static ui::Dataspace pickBestDataspace(ui::ColorMode colorMode)
{
    switch (colorMode) {
        case ui::ColorMode::SRGB:
            return ui::Dataspace::V0_SRGB;
        case ui::ColorMode::DISPLAY_P3:
        case ui::ColorMode::BT2100_PQ:
        case ui::ColorMode::BT2100_HLG:
            return ui::Dataspace::DISPLAY_P3;
        default:
            return ui::Dataspace::V0_SRGB;
    }
}

static uint32_t dataSpaceToInt(ui::Dataspace d)
{
    switch (d) {
@@ -181,14 +167,6 @@ int main(int argc, char** argv)
    uint32_t w, s, h, f;
    size_t size = 0;

    // Maps orientations from DisplayInfo to ISurfaceComposer
    static const uint32_t ORIENTATION_MAP[] = {
        ISurfaceComposer::eRotateNone, // 0 == DISPLAY_ORIENTATION_0
        ISurfaceComposer::eRotate270, // 1 == DISPLAY_ORIENTATION_90
        ISurfaceComposer::eRotate180, // 2 == DISPLAY_ORIENTATION_180
        ISurfaceComposer::eRotate90, // 3 == DISPLAY_ORIENTATION_270
    };

    // setThreadPoolMaxThreadCount(0) actually tells the kernel it's
    // not allowed to spawn any additional threads, but we still spawn
    // a binder thread from userspace when we call startThreadPool().
@@ -196,34 +174,10 @@ int main(int argc, char** argv)
    ProcessState::self()->setThreadPoolMaxThreadCount(0);
    ProcessState::self()->startThreadPool();

    const sp<IBinder> display = SurfaceComposerClient::getPhysicalDisplayToken(*displayId);
    if (display == nullptr) {
        fprintf(stderr, "Failed to get token for invalid display %"
                ANDROID_PHYSICAL_DISPLAY_ID_FORMAT "\n", *displayId);
        return 1;
    }

    Vector<DisplayInfo> configs;
    SurfaceComposerClient::getDisplayConfigs(display, &configs);
    int activeConfig = SurfaceComposerClient::getActiveConfig(display);
    if (static_cast<size_t>(activeConfig) >= configs.size()) {
        fprintf(stderr, "Active config %d not inside configs (size %zu)\n",
                activeConfig, configs.size());
        return 1;
    }
    uint8_t displayOrientation = configs[activeConfig].orientation;
    uint32_t captureOrientation = ORIENTATION_MAP[displayOrientation];

    ui::Dataspace outDataspace;
    sp<GraphicBuffer> outBuffer;
    ui::Dataspace reqDataspace =
        pickBestDataspace(SurfaceComposerClient::getActiveColorMode(display));

    // Due to the fact that we hard code the way we write pixels into screenshot,
    // we hard code RGBA_8888 here.
    ui::PixelFormat reqPixelFormat = ui::PixelFormat::RGBA_8888;
    status_t result = ScreenshotClient::capture(display, reqDataspace, reqPixelFormat, Rect(),
                                                0 /* reqWidth */, 0 /* reqHeight */, false,
                                                captureOrientation, &outBuffer);
    status_t result = ScreenshotClient::capture(*displayId, &outDataspace, &outBuffer);
    if (result != NO_ERROR) {
        close(fd);
        return 1;
@@ -233,10 +187,10 @@ int main(int argc, char** argv)

    if (base == nullptr || result != NO_ERROR) {
        String8 reason;
        if (base == nullptr) {
            reason = "Failed to write to buffer";
        } else {
        if (result != NO_ERROR) {
            reason.appendFormat(" Error Code: %d", result);
        } else {
            reason = "Failed to write to buffer";
        }
        fprintf(stderr, "Failed to take screenshot (%s)\n", reason.c_str());
        close(fd);
@@ -252,7 +206,7 @@ int main(int argc, char** argv)
    if (png) {
        const SkImageInfo info =
            SkImageInfo::Make(w, h, flinger2skia(f), kPremul_SkAlphaType,
                              dataSpaceToColorSpace(reqDataspace));
                              dataSpaceToColorSpace(outDataspace));
        SkPixmap pixmap(info, base, s * bytesPerPixel(f));
        struct FDWStream final : public SkWStream {
          size_t fBytesWritten = 0;
@@ -269,7 +223,7 @@ int main(int argc, char** argv)
            notifyMediaScanner(fn);
        }
    } else {
        uint32_t c = dataSpaceToInt(reqDataspace);
        uint32_t c = dataSpaceToInt(outDataspace);
        write(fd, &w, 4);
        write(fd, &h, 4);
        write(fd, &f, 4);
+83 −0
Original line number Diff line number Diff line
@@ -294,6 +294,10 @@ message Atom {
        MediametricsMediadrmReported mediametrics_mediadrm_reported = 198;
        MediametricsNuPlayerReported mediametrics_nuplayer_reported = 199;
        MediametricsRecorderReported mediametrics_recorder_reported = 200;
        VehicleMapServicePacketReported vms_packet_reported = 201;
        VehicleMapServicePacketFailureReported vms_packet_failure_reported = 202;
        CarPowerStateChanged car_power_state_changed = 203;
        GarageModeInfo garage_mode_info = 204;
    }

    // Pulled events will start at field 10000.
@@ -6140,6 +6144,12 @@ message GpuStatsGlobalInfo {

    // Api version of the system GLES driver.
    optional int32 gles_version = 11;

    // Total count of the angle driver gets loaded.
    optional int64 angle_loading_count = 12;

    // Total count of the angle driver fails to be loaded.
    optional int64 angle_loading_failure_count = 13;
}

/**
@@ -6172,6 +6182,13 @@ message GpuStatsAppInfo {
    // Vulkan driver loading time info.
    optional GpuDriverLoadingTime vk_driver_loading_time = 4
            [(android.os.statsd.log_mode) = MODE_BYTES];

    // Angle driver loading time info.
    optional GpuDriverLoadingTime angle_driver_loading_time = 5
            [(android.os.statsd.log_mode) = MODE_BYTES];

    // CPU Vulkan implementation is in use.
    optional bool cpu_vulkan_in_use = 6;
}

/*
@@ -6256,3 +6273,69 @@ message IntelligenceEventReported {
  optional android.stats.intelligence.EventType event_id = 1;
  optional android.stats.intelligence.Status status = 2;
}

/**
 * Logs information about Vehicle Map Service packets. It specifies the layer
 * type, subtype, data version and size of the packet.
 */
message VehicleMapServicePacketReported {
  // Identifies the type of data being transported by a Vehicle Maps Service
  // packet.
  optional int32 layer_type = 1;
  // Identifies the subtype of the layer.
  optional int32 layer_subtype = 2;
  // Identifies the version of the data being transported by a Vehicle Maps
  // Service packet.
  optional int32 version = 3;
  // Size in bytes of the packet.
  optional int64 size_in_bytes = 4;
}

/**
 * Logs that a Vehicle Map Service packet failed to be delivered.
 */
message VehicleMapServicePacketFailureReported {
  // Identifies the type of data being transported by a Vehicle Map Service
  // packet.
  optional int32 layer_type = 1;
  // Identifies the subtype of the layer.
  optional int32 layer_subtype = 2;
  // Identifies the version of the data being transported by a Vehicle Map
  // Service packet.
  optional int32 version = 3;
  // Identifies the package name of the publisher of the data.
  optional string publisher_name = 4;
  // Identifies the package name of the subscriber of the data. An empty string
  // signifies that there are zero subscribers for the packet.
  optional string subscriber_name = 5;
}

/**
 * Logs when Car Power state changed.
 *
 * Logged from:
 *   packages/services/Car/service/src/com/android/car/CarStatsLog.java
 */
message CarPowerStateChanged {
    // States come from CpmsState in CarPowerManagementService.java.
    enum State {
       WAIT_FOR_VHAL = 0;
       ON = 1;
       SHUTDOWN_PREPARE = 2;
       WAIT_FOR_FINISH = 3;
       SUSPEND = 4;
       SIMULATE_SLEEP = 5;
    }
    optional State state = 1;
}

/**
 * Logs whether GarageMode is entered.
 *
 * Logged from:
 *   packages/services/Car/service/src/com/android/car/CarStatsLog.java
 */
message GarageModeInfo {
    // Whether GarageMode is entered.
    optional bool is_garage_mode = 1;
}
+4 −0
Original line number Diff line number Diff line
@@ -68,6 +68,8 @@ static bool pullGpuStatsGlobalInfo(const sp<IGpuService>& gpuService,
        if (!event->write(info.vulkanVersion)) return false;
        if (!event->write(info.cpuVulkanVersion)) return false;
        if (!event->write(info.glesVersion)) return false;
        if (!event->write((int64_t)info.angleLoadingCount)) return false;
        if (!event->write((int64_t)info.angleLoadingFailureCount)) return false;
        event->init();
        data->emplace_back(event);
    }
@@ -92,6 +94,8 @@ static bool pullGpuStatsAppInfo(const sp<IGpuService>& gpuService,
        if (!event->write((int64_t)info.driverVersionCode)) return false;
        if (!event->write(int64VectorToProtoByteString(info.glDriverLoadingTime))) return false;
        if (!event->write(int64VectorToProtoByteString(info.vkDriverLoadingTime))) return false;
        if (!event->write(int64VectorToProtoByteString(info.angleDriverLoadingTime))) return false;
        if (!event->write(info.cpuVulkanInUse)) return false;
        event->init();
        data->emplace_back(event);
    }
Loading