add getters to SoundTrigger.ModelParamRange
Bug: 148852573 Test: manual test app with GTS test Change-Id: Id8660ce70f926689449119f455579bc2ad2454cb
This commit is contained in:
@@ -43964,8 +43964,8 @@ package android.service.voice {
|
||||
}
|
||||
|
||||
public static final class AlwaysOnHotwordDetector.ModelParamRange {
|
||||
method public int end();
|
||||
method public int start();
|
||||
method public int getEnd();
|
||||
method public int getStart();
|
||||
}
|
||||
|
||||
public class VoiceInteractionService extends android.app.Service {
|
||||
|
||||
@@ -3740,10 +3740,10 @@ package android.hardware.soundtrigger {
|
||||
}
|
||||
|
||||
public static final class SoundTrigger.ModelParamRange implements android.os.Parcelable {
|
||||
method public int getEnd();
|
||||
method public int getStart();
|
||||
method public void writeToParcel(@NonNull android.os.Parcel, int);
|
||||
field @NonNull public static final android.os.Parcelable.Creator<android.hardware.soundtrigger.SoundTrigger.ModelParamRange> CREATOR;
|
||||
field public final int end;
|
||||
field public final int start;
|
||||
}
|
||||
|
||||
public static final class SoundTrigger.ModuleProperties implements android.os.Parcelable {
|
||||
|
||||
@@ -735,22 +735,40 @@ public class SoundTrigger {
|
||||
/**
|
||||
* The inclusive start of supported range.
|
||||
*/
|
||||
public final int start;
|
||||
private final int mStart;
|
||||
|
||||
/**
|
||||
* The inclusive end of supported range.
|
||||
*/
|
||||
public final int end;
|
||||
private final int mEnd;
|
||||
|
||||
ModelParamRange(int start, int end) {
|
||||
this.start = start;
|
||||
this.end = end;
|
||||
this.mStart = start;
|
||||
this.mEnd = end;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
private ModelParamRange(@NonNull Parcel in) {
|
||||
this.start = in.readInt();
|
||||
this.end = in.readInt();
|
||||
this.mStart = in.readInt();
|
||||
this.mEnd = in.readInt();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the beginning of the param range
|
||||
*
|
||||
* @return The inclusive start of the supported range.
|
||||
*/
|
||||
public int getStart() {
|
||||
return mStart;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the end of the param range
|
||||
*
|
||||
* @return The inclusive end of the supported range.
|
||||
*/
|
||||
public int getEnd() {
|
||||
return mEnd;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@@ -780,8 +798,8 @@ public class SoundTrigger {
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + (start);
|
||||
result = prime * result + (end);
|
||||
result = prime * result + (mStart);
|
||||
result = prime * result + (mEnd);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -797,10 +815,10 @@ public class SoundTrigger {
|
||||
return false;
|
||||
}
|
||||
ModelParamRange other = (ModelParamRange) obj;
|
||||
if (start != other.start) {
|
||||
if (mStart != other.mStart) {
|
||||
return false;
|
||||
}
|
||||
if (end != other.end) {
|
||||
if (mEnd != other.mEnd) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -808,14 +826,14 @@ public class SoundTrigger {
|
||||
|
||||
@Override
|
||||
public void writeToParcel(@NonNull Parcel dest, int flags) {
|
||||
dest.writeInt(start);
|
||||
dest.writeInt(end);
|
||||
dest.writeInt(mStart);
|
||||
dest.writeInt(mEnd);
|
||||
}
|
||||
|
||||
@Override
|
||||
@NonNull
|
||||
public String toString() {
|
||||
return "ModelParamRange [start=" + start + ", end=" + end + "]";
|
||||
return "ModelParamRange [start=" + mStart + ", end=" + mEnd + "]";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -249,21 +249,21 @@ public class AlwaysOnHotwordDetector {
|
||||
}
|
||||
|
||||
/**
|
||||
* The inclusive start of supported range.
|
||||
* Get the beginning of the param range
|
||||
*
|
||||
* @return start of range
|
||||
* @return The inclusive start of the supported range.
|
||||
*/
|
||||
public int start() {
|
||||
return mModelParamRange.start;
|
||||
public int getStart() {
|
||||
return mModelParamRange.getStart();
|
||||
}
|
||||
|
||||
/**
|
||||
* The inclusive end of supported range.
|
||||
* Get the end of the param range
|
||||
*
|
||||
* @return end of range
|
||||
* @return The inclusive end of the supported range.
|
||||
*/
|
||||
public int end() {
|
||||
return mModelParamRange.end;
|
||||
public int getEnd() {
|
||||
return mModelParamRange.getEnd();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user