script-astra/Android/Sdk/sources/android-35/android/hardware/power/IPowerHintSession.java
localadmin 4380f00a78 init
2025-01-20 18:15:20 +03:00

467 lines
17 KiB
Java

/*
* This file is auto-generated. DO NOT MODIFY.
* Using: out/host/linux-x86/bin/aidl --lang=java --structured --version 5 --hash d111735ed2b89b6c32443aac9b162b1afbbea3f2 -t --stability vintf --min_sdk_version platform_apis -pout/soong/.intermediates/hardware/interfaces/common/fmq/aidl/android.hardware.common.fmq_interface/1/preprocessed.aidl -pout/soong/.intermediates/hardware/interfaces/common/aidl/android.hardware.common_interface/2/preprocessed.aidl --ninja -d out/soong/.intermediates/hardware/interfaces/power/aidl/android.hardware.power-V5-java-source/gen/android/hardware/power/IPowerHintSession.java.d -o out/soong/.intermediates/hardware/interfaces/power/aidl/android.hardware.power-V5-java-source/gen -Nhardware/interfaces/power/aidl/aidl_api/android.hardware.power/5 hardware/interfaces/power/aidl/aidl_api/android.hardware.power/5/android/hardware/power/IPowerHintSession.aidl
*/
package android.hardware.power;
public interface IPowerHintSession extends android.os.IInterface
{
/**
* The version of this interface that the caller is built against.
* This might be different from what {@link #getInterfaceVersion()
* getInterfaceVersion} returns as that is the version of the interface
* that the remote object is implementing.
*/
public static final int VERSION = 5;
public static final String HASH = "d111735ed2b89b6c32443aac9b162b1afbbea3f2";
/** Default implementation for IPowerHintSession. */
public static class Default implements android.hardware.power.IPowerHintSession
{
@Override public void updateTargetWorkDuration(long targetDurationNanos) throws android.os.RemoteException
{
}
@Override public void reportActualWorkDuration(android.hardware.power.WorkDuration[] durations) throws android.os.RemoteException
{
}
@Override public void pause() throws android.os.RemoteException
{
}
@Override public void resume() throws android.os.RemoteException
{
}
@Override public void close() throws android.os.RemoteException
{
}
@Override public void sendHint(int hint) throws android.os.RemoteException
{
}
@Override public void setThreads(int[] threadIds) throws android.os.RemoteException
{
}
@Override public void setMode(int type, boolean enabled) throws android.os.RemoteException
{
}
@Override public android.hardware.power.SessionConfig getSessionConfig() throws android.os.RemoteException
{
return null;
}
@Override
public int getInterfaceVersion() {
return 0;
}
@Override
public String getInterfaceHash() {
return "";
}
@Override
public android.os.IBinder asBinder() {
return null;
}
}
/** Local-side IPC implementation stub class. */
public static abstract class Stub extends android.os.Binder implements android.hardware.power.IPowerHintSession
{
/** Construct the stub at attach it to the interface. */
@SuppressWarnings("this-escape")
public Stub()
{
this.markVintfStability();
this.attachInterface(this, DESCRIPTOR);
}
/**
* Cast an IBinder object into an android.hardware.power.IPowerHintSession interface,
* generating a proxy if needed.
*/
public static android.hardware.power.IPowerHintSession asInterface(android.os.IBinder obj)
{
if ((obj==null)) {
return null;
}
android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
if (((iin!=null)&&(iin instanceof android.hardware.power.IPowerHintSession))) {
return ((android.hardware.power.IPowerHintSession)iin);
}
return new android.hardware.power.IPowerHintSession.Stub.Proxy(obj);
}
@Override public android.os.IBinder asBinder()
{
return this;
}
/** @hide */
public static java.lang.String getDefaultTransactionName(int transactionCode)
{
switch (transactionCode)
{
case TRANSACTION_updateTargetWorkDuration:
{
return "updateTargetWorkDuration";
}
case TRANSACTION_reportActualWorkDuration:
{
return "reportActualWorkDuration";
}
case TRANSACTION_pause:
{
return "pause";
}
case TRANSACTION_resume:
{
return "resume";
}
case TRANSACTION_close:
{
return "close";
}
case TRANSACTION_sendHint:
{
return "sendHint";
}
case TRANSACTION_setThreads:
{
return "setThreads";
}
case TRANSACTION_setMode:
{
return "setMode";
}
case TRANSACTION_getSessionConfig:
{
return "getSessionConfig";
}
case TRANSACTION_getInterfaceVersion:
{
return "getInterfaceVersion";
}
case TRANSACTION_getInterfaceHash:
{
return "getInterfaceHash";
}
default:
{
return null;
}
}
}
/** @hide */
public java.lang.String getTransactionName(int transactionCode)
{
return this.getDefaultTransactionName(transactionCode);
}
@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
{
java.lang.String descriptor = DESCRIPTOR;
if (code >= android.os.IBinder.FIRST_CALL_TRANSACTION && code <= android.os.IBinder.LAST_CALL_TRANSACTION) {
data.enforceInterface(descriptor);
}
if (code == INTERFACE_TRANSACTION) {
reply.writeString(descriptor);
return true;
}
else if (code == TRANSACTION_getInterfaceVersion) {
reply.writeNoException();
reply.writeInt(getInterfaceVersion());
return true;
}
else if (code == TRANSACTION_getInterfaceHash) {
reply.writeNoException();
reply.writeString(getInterfaceHash());
return true;
}
switch (code)
{
case TRANSACTION_updateTargetWorkDuration:
{
long _arg0;
_arg0 = data.readLong();
data.enforceNoDataAvail();
this.updateTargetWorkDuration(_arg0);
break;
}
case TRANSACTION_reportActualWorkDuration:
{
android.hardware.power.WorkDuration[] _arg0;
_arg0 = data.createTypedArray(android.hardware.power.WorkDuration.CREATOR);
data.enforceNoDataAvail();
this.reportActualWorkDuration(_arg0);
break;
}
case TRANSACTION_pause:
{
this.pause();
break;
}
case TRANSACTION_resume:
{
this.resume();
break;
}
case TRANSACTION_close:
{
this.close();
break;
}
case TRANSACTION_sendHint:
{
int _arg0;
_arg0 = data.readInt();
data.enforceNoDataAvail();
this.sendHint(_arg0);
break;
}
case TRANSACTION_setThreads:
{
int[] _arg0;
_arg0 = data.createIntArray();
data.enforceNoDataAvail();
this.setThreads(_arg0);
reply.writeNoException();
break;
}
case TRANSACTION_setMode:
{
int _arg0;
_arg0 = data.readInt();
boolean _arg1;
_arg1 = data.readBoolean();
data.enforceNoDataAvail();
this.setMode(_arg0, _arg1);
break;
}
case TRANSACTION_getSessionConfig:
{
android.hardware.power.SessionConfig _result = this.getSessionConfig();
reply.writeNoException();
reply.writeTypedObject(_result, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
break;
}
default:
{
return super.onTransact(code, data, reply, flags);
}
}
return true;
}
private static class Proxy implements android.hardware.power.IPowerHintSession
{
private android.os.IBinder mRemote;
Proxy(android.os.IBinder remote)
{
mRemote = remote;
}
private int mCachedVersion = -1;
private String mCachedHash = "-1";
@Override public android.os.IBinder asBinder()
{
return mRemote;
}
public java.lang.String getInterfaceDescriptor()
{
return DESCRIPTOR;
}
@Override public void updateTargetWorkDuration(long targetDurationNanos) throws android.os.RemoteException
{
android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeLong(targetDurationNanos);
boolean _status = mRemote.transact(Stub.TRANSACTION_updateTargetWorkDuration, _data, null, android.os.IBinder.FLAG_ONEWAY);
if (!_status) {
throw new android.os.RemoteException("Method updateTargetWorkDuration is unimplemented.");
}
}
finally {
_data.recycle();
}
}
@Override public void reportActualWorkDuration(android.hardware.power.WorkDuration[] durations) throws android.os.RemoteException
{
android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeTypedArray(durations, 0);
boolean _status = mRemote.transact(Stub.TRANSACTION_reportActualWorkDuration, _data, null, android.os.IBinder.FLAG_ONEWAY);
if (!_status) {
throw new android.os.RemoteException("Method reportActualWorkDuration is unimplemented.");
}
}
finally {
_data.recycle();
}
}
@Override public void pause() throws android.os.RemoteException
{
android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
try {
_data.writeInterfaceToken(DESCRIPTOR);
boolean _status = mRemote.transact(Stub.TRANSACTION_pause, _data, null, android.os.IBinder.FLAG_ONEWAY);
if (!_status) {
throw new android.os.RemoteException("Method pause is unimplemented.");
}
}
finally {
_data.recycle();
}
}
@Override public void resume() throws android.os.RemoteException
{
android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
try {
_data.writeInterfaceToken(DESCRIPTOR);
boolean _status = mRemote.transact(Stub.TRANSACTION_resume, _data, null, android.os.IBinder.FLAG_ONEWAY);
if (!_status) {
throw new android.os.RemoteException("Method resume is unimplemented.");
}
}
finally {
_data.recycle();
}
}
@Override public void close() throws android.os.RemoteException
{
android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
try {
_data.writeInterfaceToken(DESCRIPTOR);
boolean _status = mRemote.transact(Stub.TRANSACTION_close, _data, null, android.os.IBinder.FLAG_ONEWAY);
if (!_status) {
throw new android.os.RemoteException("Method close is unimplemented.");
}
}
finally {
_data.recycle();
}
}
@Override public void sendHint(int hint) throws android.os.RemoteException
{
android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeInt(hint);
boolean _status = mRemote.transact(Stub.TRANSACTION_sendHint, _data, null, android.os.IBinder.FLAG_ONEWAY);
if (!_status) {
throw new android.os.RemoteException("Method sendHint is unimplemented.");
}
}
finally {
_data.recycle();
}
}
@Override public void setThreads(int[] threadIds) throws android.os.RemoteException
{
android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
android.os.Parcel _reply = android.os.Parcel.obtain();
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeIntArray(threadIds);
boolean _status = mRemote.transact(Stub.TRANSACTION_setThreads, _data, _reply, 0);
if (!_status) {
throw new android.os.RemoteException("Method setThreads is unimplemented.");
}
_reply.readException();
}
finally {
_reply.recycle();
_data.recycle();
}
}
@Override public void setMode(int type, boolean enabled) throws android.os.RemoteException
{
android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeInt(type);
_data.writeBoolean(enabled);
boolean _status = mRemote.transact(Stub.TRANSACTION_setMode, _data, null, android.os.IBinder.FLAG_ONEWAY);
if (!_status) {
throw new android.os.RemoteException("Method setMode is unimplemented.");
}
}
finally {
_data.recycle();
}
}
@Override public android.hardware.power.SessionConfig getSessionConfig() throws android.os.RemoteException
{
android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
android.os.Parcel _reply = android.os.Parcel.obtain();
android.hardware.power.SessionConfig _result;
try {
_data.writeInterfaceToken(DESCRIPTOR);
boolean _status = mRemote.transact(Stub.TRANSACTION_getSessionConfig, _data, _reply, 0);
if (!_status) {
throw new android.os.RemoteException("Method getSessionConfig is unimplemented.");
}
_reply.readException();
_result = _reply.readTypedObject(android.hardware.power.SessionConfig.CREATOR);
}
finally {
_reply.recycle();
_data.recycle();
}
return _result;
}
@Override
public int getInterfaceVersion() throws android.os.RemoteException {
if (mCachedVersion == -1) {
android.os.Parcel data = android.os.Parcel.obtain(asBinder());
android.os.Parcel reply = android.os.Parcel.obtain();
try {
data.writeInterfaceToken(DESCRIPTOR);
boolean _status = mRemote.transact(Stub.TRANSACTION_getInterfaceVersion, data, reply, 0);
reply.readException();
mCachedVersion = reply.readInt();
} finally {
reply.recycle();
data.recycle();
}
}
return mCachedVersion;
}
@Override
public synchronized String getInterfaceHash() throws android.os.RemoteException {
if ("-1".equals(mCachedHash)) {
android.os.Parcel data = android.os.Parcel.obtain(asBinder());
android.os.Parcel reply = android.os.Parcel.obtain();
try {
data.writeInterfaceToken(DESCRIPTOR);
boolean _status = mRemote.transact(Stub.TRANSACTION_getInterfaceHash, data, reply, 0);
reply.readException();
mCachedHash = reply.readString();
} finally {
reply.recycle();
data.recycle();
}
}
return mCachedHash;
}
}
static final int TRANSACTION_updateTargetWorkDuration = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);
static final int TRANSACTION_reportActualWorkDuration = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1);
static final int TRANSACTION_pause = (android.os.IBinder.FIRST_CALL_TRANSACTION + 2);
static final int TRANSACTION_resume = (android.os.IBinder.FIRST_CALL_TRANSACTION + 3);
static final int TRANSACTION_close = (android.os.IBinder.FIRST_CALL_TRANSACTION + 4);
static final int TRANSACTION_sendHint = (android.os.IBinder.FIRST_CALL_TRANSACTION + 5);
static final int TRANSACTION_setThreads = (android.os.IBinder.FIRST_CALL_TRANSACTION + 6);
static final int TRANSACTION_setMode = (android.os.IBinder.FIRST_CALL_TRANSACTION + 7);
static final int TRANSACTION_getSessionConfig = (android.os.IBinder.FIRST_CALL_TRANSACTION + 8);
static final int TRANSACTION_getInterfaceVersion = (android.os.IBinder.FIRST_CALL_TRANSACTION + 16777214);
static final int TRANSACTION_getInterfaceHash = (android.os.IBinder.FIRST_CALL_TRANSACTION + 16777213);
/** @hide */
public int getMaxTransactionId()
{
return 16777214;
}
}
/** @hide */
public static final java.lang.String DESCRIPTOR = "android$hardware$power$IPowerHintSession".replace('$', '.');
public void updateTargetWorkDuration(long targetDurationNanos) throws android.os.RemoteException;
public void reportActualWorkDuration(android.hardware.power.WorkDuration[] durations) throws android.os.RemoteException;
public void pause() throws android.os.RemoteException;
public void resume() throws android.os.RemoteException;
public void close() throws android.os.RemoteException;
public void sendHint(int hint) throws android.os.RemoteException;
public void setThreads(int[] threadIds) throws android.os.RemoteException;
public void setMode(int type, boolean enabled) throws android.os.RemoteException;
public android.hardware.power.SessionConfig getSessionConfig() throws android.os.RemoteException;
public int getInterfaceVersion() throws android.os.RemoteException;
public String getInterfaceHash() throws android.os.RemoteException;
}