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

Commit f4ab0181 authored by Kalesh Singh's avatar Kalesh Singh
Browse files

Memtrack HAL: Add stable AIDL implementation

Bug: 175021432
Test: adb shell dumpsys -l | grep android.hardware.memtrack.IMemtrack
Test: VtsHalMemtrackTargetTest
Change-Id: Ib6c634def4eeca62b0b2615dc7dc273183cda2b1
parent 2682ae42
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -334,6 +334,13 @@
            <instance>default</instance>
        </interface>
    </hal>
    <hal format="aidl" optional="true">
        <name>android.hardware.memtrack</name>
        <interface>
            <name>IMemtrack</name>
            <instance>default</instance>
        </interface>
    </hal>
    <hal format="hidl" optional="true">
        <name>android.hardware.memtrack</name>
        <version>1.0</version>
+33 −0
Original line number Diff line number Diff line
// Copyright (C) 2020 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.

aidl_interface {
    name: "android.hardware.memtrack",
    vendor_available: true,
    srcs: ["android/hardware/memtrack/*.aidl"],
    stability: "vintf",
    backend: {
        cpp: {
            enabled: false,
        },
        java: {
            enabled: false,
        },
        ndk: {
            vndk: {
                enabled: true,
            },
        },
    },
}
+23 −0
Original line number Diff line number Diff line
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
///////////////////////////////////////////////////////////////////////////////

// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
// edit this file. It looks like you are doing that because you have modified
// an AIDL interface in a backward-incompatible way, e.g., deleting a function
// from an interface or a field from a parcelable and it broke the build. That
// breakage is intended.
//
// You must not make a backward incompatible changes to the AIDL files built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.

package android.hardware.memtrack;
@VintfStability
parcelable DeviceInfo {
  int id;
  @utf8InCpp String name;
}
+23 −0
Original line number Diff line number Diff line
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
///////////////////////////////////////////////////////////////////////////////

// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
// edit this file. It looks like you are doing that because you have modified
// an AIDL interface in a backward-incompatible way, e.g., deleting a function
// from an interface or a field from a parcelable and it broke the build. That
// breakage is intended.
//
// You must not make a backward incompatible changes to the AIDL files built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.

package android.hardware.memtrack;
@VintfStability
interface IMemtrack {
  android.hardware.memtrack.MemtrackRecord[] getMemory(in int pid, in android.hardware.memtrack.MemtrackType type);
  android.hardware.memtrack.DeviceInfo[] getGpuDeviceInfo();
}
+32 −0
Original line number Diff line number Diff line
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
///////////////////////////////////////////////////////////////////////////////

// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
// edit this file. It looks like you are doing that because you have modified
// an AIDL interface in a backward-incompatible way, e.g., deleting a function
// from an interface or a field from a parcelable and it broke the build. That
// breakage is intended.
//
// You must not make a backward incompatible changes to the AIDL files built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.

package android.hardware.memtrack;
@VintfStability
parcelable MemtrackRecord {
  int flags;
  long sizeInBytes;
  const int FLAG_SMAPS_ACCOUNTED = 2;
  const int FLAG_SMAPS_UNACCOUNTED = 4;
  const int FLAG_SHARED = 8;
  const int FLAG_SHARED_PSS = 16;
  const int FLAG_PRIVATE = 32;
  const int FLAG_SYSTEM = 64;
  const int FLAG_DEDICATED = 128;
  const int FLAG_NONSECURE = 256;
  const int FLAG_SECURE = 512;
}
Loading