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

Commit 519b92b4 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5490587 from 873734d1 to qt-release

Change-Id: I07bfda538a993a526f5421496cdae9d887a8ef50
parents 6de4c303 873734d1
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -8988,8 +8988,8 @@ package android.bluetooth.le {
    method public android.bluetooth.le.ScanFilter.Builder setManufacturerData(int, byte[], byte[]);
    method public android.bluetooth.le.ScanFilter.Builder setServiceData(android.os.ParcelUuid, byte[]);
    method public android.bluetooth.le.ScanFilter.Builder setServiceData(android.os.ParcelUuid, byte[], byte[]);
    method public android.bluetooth.le.ScanFilter.Builder setServiceSolicitationUuid(android.os.ParcelUuid);
    method public android.bluetooth.le.ScanFilter.Builder setServiceSolicitationUuid(android.os.ParcelUuid, android.os.ParcelUuid);
    method @NonNull public android.bluetooth.le.ScanFilter.Builder setServiceSolicitationUuid(@Nullable android.os.ParcelUuid);
    method @NonNull public android.bluetooth.le.ScanFilter.Builder setServiceSolicitationUuid(@Nullable android.os.ParcelUuid, @Nullable android.os.ParcelUuid);
    method public android.bluetooth.le.ScanFilter.Builder setServiceUuid(android.os.ParcelUuid);
    method public android.bluetooth.le.ScanFilter.Builder setServiceUuid(android.os.ParcelUuid, android.os.ParcelUuid);
  }
@@ -25831,7 +25831,7 @@ package android.media {
  public static final class MediaSession2.Builder {
    ctor public MediaSession2.Builder(@NonNull android.content.Context);
    method @NonNull public android.media.MediaSession2 build();
    method @NonNull public android.media.MediaSession2.Builder setExtras(@Nullable android.os.Bundle);
    method @NonNull public android.media.MediaSession2.Builder setExtras(@NonNull android.os.Bundle);
    method @NonNull public android.media.MediaSession2.Builder setId(@NonNull String);
    method @NonNull public android.media.MediaSession2.Builder setSessionActivity(@Nullable android.app.PendingIntent);
    method @NonNull public android.media.MediaSession2.Builder setSessionCallback(@NonNull java.util.concurrent.Executor, @NonNull android.media.MediaSession2.SessionCallback);
+1 −0
Original line number Diff line number Diff line
@@ -2010,6 +2010,7 @@ package android.os {
    field public static final int EFFECT_STRENGTH_LIGHT = 0; // 0x0
    field public static final int EFFECT_STRENGTH_MEDIUM = 1; // 0x1
    field public static final int EFFECT_STRENGTH_STRONG = 2; // 0x2
    field public static final int EFFECT_TEXTURE_TICK = 21; // 0x15
    field public static final int EFFECT_THUD = 3; // 0x3
    field public static final int[] RINGTONES;
  }
+30 −10
Original line number Diff line number Diff line
@@ -156,7 +156,7 @@ message Atom {
        KeyValuePairsAtom key_value_pairs_atom = 83 [(allow_from_any_uid) = true];
        VibratorStateChanged vibrator_state_changed = 84;
        DeferredJobStatsReported deferred_job_stats_reported = 85;
        ThermalThrottlingStateChanged thermal_throttling = 86;
        ThermalThrottlingStateChanged thermal_throttling = 86 [deprecated=true];
        BiometricAcquired biometric_acquired = 87;
        BiometricAuthenticated biometric_authenticated = 88;
        BiometricErrorOccurred biometric_error_occurred = 89;
@@ -280,6 +280,7 @@ message Atom {
        BluetoothClassOfDeviceReported bluetooth_class_of_device_reported = 187;
        IntelligenceEventReported intelligence_event_reported =
            188 [(log_from_module) = "intelligence"];
        ThermalThrottlingSeverityStateChanged thermal_throttling_severity_state_changed = 189;
    }

    // Pulled events will start at field 10000.
@@ -409,6 +410,7 @@ message KeyValuePairsAtom {
 */

/**
 * This atom is deprecated starting in Q. Please use ThermalThrottlingSeverityStateChanged.
 * Logs when the Thermal service HAL notifies the throttling start/stop events.
 *
 * Logged from:
@@ -426,14 +428,7 @@ message ThermalThrottlingStateChanged {
    }
    optional State state = 2;

    // Temperature in deci degrees celsius
    optional float temperature = 3;

    // Severity of throttling
    optional android.os.ThrottlingSeverityEnum severity = 4;

    // Thermistor name
    optional string sensor_name = 5;
}

/**
@@ -2363,6 +2358,27 @@ message BatteryCausedShutdown {
    optional int32 last_recorded_micro_volt = 1;
}

/**
 * Logs when ThermalService receives throttling events.
 *
 * Logged from:
 *   frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java
 */
message ThermalThrottlingSeverityStateChanged {
    // The type of temperature being reported (CPU, GPU, SKIN, etc)
    optional android.os.TemperatureTypeEnum sensor_type = 1;

    // The name of the temperature source. Eg. CPU0
    optional string sensor_name = 2;

    // Temperature in tenths of a degree C.
    // For BCL, it is decimillivolt, decimilliamps, and percentage * 10.
    optional int32 temperature_deci_celsius = 3;

    // Relative severity of the throttling, see enum definition.
    optional android.os.ThrottlingSeverityEnum severity = 4;
}

/**
 * Logs the duration of a davey (jank of >=700ms) when it occurs
 *
@@ -3804,7 +3820,7 @@ message ProcessMemoryState {

    // SWAP
    // Value is read from memory.stat, field total_swap if per-app memory
    // cgroups are enabled. Otherwise, 0.
    // cgroups are enabled. Otherwise, VmSwap from /proc/PID/status.
    optional int64 swap_in_bytes = 8;

    // Deprecated: use ProcessMemoryHighWaterMark atom instead. Always 0.
@@ -3844,6 +3860,10 @@ message NativeProcessMemoryState {
    // Elapsed real time when the process started.
    // Value is read from /proc/PID/stat, field 22.
    optional int64 start_time_nanos = 7;

    // SWAP
    // Value read from /proc/PID/status, field VmSwap.
    optional int64 swap_in_bytes = 8;
}

/*
+1 −1
Original line number Diff line number Diff line
@@ -146,7 +146,7 @@ std::map<int, PullAtomInfo> StatsPullerManager::kAllPullAtomInfo = {
          .puller = new StatsCompanionServicePuller(android::util::PROCESS_MEMORY_STATE)}},
        // native_process_memory_state
        {android::util::NATIVE_PROCESS_MEMORY_STATE,
         {.additiveFields = {3, 4, 5, 6},
         {.additiveFields = {3, 4, 5, 6, 8},
          .puller = new StatsCompanionServicePuller(android::util::NATIVE_PROCESS_MEMORY_STATE)}},
        // process_memory_high_water_mark
        {android::util::PROCESS_MEMORY_HIGH_WATER_MARK,
+0 −99
Original line number Diff line number Diff line
/*
 * Copyright 2017, The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#define DEBUG false  // STOPSHIP if true
#include "Log.h"

#include <sstream>
#include "MemoryLeakTrackUtil.h"

/*
 * The code here originally resided in MediaPlayerService.cpp
 */

// Figure out the abi based on defined macros.
#if defined(__arm__)
#define ABI_STRING "arm"
#elif defined(__aarch64__)
#define ABI_STRING "arm64"
#elif defined(__mips__) && !defined(__LP64__)
#define ABI_STRING "mips"
#elif defined(__mips__) && defined(__LP64__)
#define ABI_STRING "mips64"
#elif defined(__i386__)
#define ABI_STRING "x86"
#elif defined(__x86_64__)
#define ABI_STRING "x86_64"
#else
#error "Unsupported ABI"
#endif

extern std::string backtrace_string(const uintptr_t* frames, size_t frame_count);

namespace android {
namespace os {
namespace statsd {

extern "C" void get_malloc_leak_info(uint8_t** info, size_t* overallSize, size_t* infoSize,
                                     size_t* totalMemory, size_t* backtraceSize);

extern "C" void free_malloc_leak_info(uint8_t* info);

std::string dumpMemInfo(size_t limit) {
    uint8_t* info;
    size_t overallSize;
    size_t infoSize;
    size_t totalMemory;
    size_t backtraceSize;
    get_malloc_leak_info(&info, &overallSize, &infoSize, &totalMemory, &backtraceSize);

    size_t count;
    if (info == nullptr || overallSize == 0 || infoSize == 0 ||
        (count = overallSize / infoSize) == 0) {
        VLOG("no malloc info, libc.debug.malloc.program property should be set");
        return std::string();
    }

    std::ostringstream oss;
    oss << totalMemory << " bytes in " << count << " allocations\n";
    oss << "  ABI: '" ABI_STRING "'"
        << "\n\n";
    if (count > limit) count = limit;

    // The memory is sorted based on total size which is useful for finding
    // worst memory offenders. For diffs, sometimes it is preferable to sort
    // based on the backtrace.
    for (size_t i = 0; i < count; i++) {
        struct AllocEntry {
            size_t size;  // bit 31 is set if this is zygote allocated memory
            size_t allocations;
            uintptr_t backtrace[];
        };

        const AllocEntry* const e = (AllocEntry*)(info + i * infoSize);

        oss << (e->size * e->allocations) << " bytes ( " << e->size << " bytes * " << e->allocations
            << " allocations )\n";
        oss << backtrace_string(e->backtrace, backtraceSize) << "\n";
    }
    oss << "\n";
    free_malloc_leak_info(info);
    return oss.str();
}

}  // namespace statsd
}  // namespace os
}  // namespace android
 No newline at end of file
Loading