Merge "Fix AudioMix.equals()"
This commit is contained in:
@@ -25,6 +25,8 @@ import android.media.AudioFormat;
|
|||||||
import android.media.AudioSystem;
|
import android.media.AudioSystem;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
|
|
||||||
|
import com.android.internal.annotations.VisibleForTesting;
|
||||||
|
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@@ -252,10 +254,10 @@ public class AudioMix {
|
|||||||
if (o == null || getClass() != o.getClass()) return false;
|
if (o == null || getClass() != o.getClass()) return false;
|
||||||
|
|
||||||
final AudioMix that = (AudioMix) o;
|
final AudioMix that = (AudioMix) o;
|
||||||
return (this.mRouteFlags == that.mRouteFlags)
|
return Objects.equals(this.mRouteFlags, that.mRouteFlags)
|
||||||
&& (this.mRule == that.mRule)
|
&& Objects.equals(this.mRule, that.mRule)
|
||||||
&& (this.mMixType == that.mMixType)
|
&& Objects.equals(this.mMixType, that.mMixType)
|
||||||
&& (this.mFormat == that.mFormat);
|
&& Objects.equals(this.mFormat, that.mFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
@@ -340,7 +342,8 @@ public class AudioMix {
|
|||||||
* @param address
|
* @param address
|
||||||
* @return the same Builder instance.
|
* @return the same Builder instance.
|
||||||
*/
|
*/
|
||||||
Builder setDevice(int deviceType, String address) {
|
@VisibleForTesting
|
||||||
|
public Builder setDevice(int deviceType, String address) {
|
||||||
mDeviceSystemType = deviceType;
|
mDeviceSystemType = deviceType;
|
||||||
mDeviceAddress = address;
|
mDeviceAddress = address;
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
Reference in New Issue
Block a user