diff options
author | John Spurlock <jspurlock@google.com> | 2015-04-14 20:00:40 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-04-14 20:00:42 +0000 |
commit | 1740c625c6b2b39d6b35d08a7bd362ea907cf082 (patch) | |
tree | 10d2e3ceaec7bb2f5eb4e882d0131de9ac03e2b7 /media | |
parent | 691ae9dc25edb1c3d005c46e729356a08450e378 (diff) | |
parent | b02c744f05b0cca05b77fcbaad4a546ad86081eb (diff) | |
download | frameworks_base-1740c625c6b2b39d6b35d08a7bd362ea907cf082.zip frameworks_base-1740c625c6b2b39d6b35d08a7bd362ea907cf082.tar.gz frameworks_base-1740c625c6b2b39d6b35d08a7bd362ea907cf082.tar.bz2 |
Merge "Zen: Enter alarms only on volume down from vibrate."
Diffstat (limited to 'media')
-rw-r--r-- | media/java/android/media/VolumePolicy.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/media/java/android/media/VolumePolicy.java b/media/java/android/media/VolumePolicy.java index 2d3376a..1d33128 100644 --- a/media/java/android/media/VolumePolicy.java +++ b/media/java/android/media/VolumePolicy.java @@ -19,6 +19,8 @@ package android.media; import android.os.Parcel; import android.os.Parcelable; +import java.util.Objects; + /** @hide */ public final class VolumePolicy implements Parcelable { public static final VolumePolicy DEFAULT = new VolumePolicy(false, false, true, 400); @@ -53,6 +55,23 @@ public final class VolumePolicy implements Parcelable { } @Override + public int hashCode() { + return Objects.hash(volumeDownToEnterSilent, volumeUpToExitSilent, doNotDisturbWhenSilent, + vibrateToSilentDebounce); + } + + @Override + public boolean equals(Object o) { + if (!(o instanceof VolumePolicy)) return false; + if (o == this) return true; + final VolumePolicy other = (VolumePolicy) o; + return other.volumeDownToEnterSilent == volumeDownToEnterSilent + && other.volumeUpToExitSilent == volumeUpToExitSilent + && other.doNotDisturbWhenSilent == doNotDisturbWhenSilent + && other.vibrateToSilentDebounce == vibrateToSilentDebounce; + } + + @Override public int describeContents() { return 0; } |