summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/profiles
diff options
context:
space:
mode:
authorRaj Yengisetty <rajesh@cyngn.com>2015-03-30 17:56:01 -0700
committerAdnan Begovic <adnan@cyngn.com>2015-10-26 16:11:15 -0700
commitfa8f2cc00dec3cd970508c19320ff8a4f41339c7 (patch)
treec00b42cd5cd771f7108f8564bc04fea8e087796e /src/com/android/settings/profiles
parent2676b7b1d2cd4aa73bb76a6a033a26fad27e3d1a (diff)
downloadpackages_apps_Settings-fa8f2cc00dec3cd970508c19320ff8a4f41339c7.zip
packages_apps_Settings-fa8f2cc00dec3cd970508c19320ff8a4f41339c7.tar.gz
packages_apps_Settings-fa8f2cc00dec3cd970508c19320ff8a4f41339c7.tar.bz2
Profiles: play Ringtone when setting volume overrides
Change-Id: Ibd171f9fcbf96aa0dae9a1dafb6fb07105b2f4c8
Diffstat (limited to 'src/com/android/settings/profiles')
-rw-r--r--src/com/android/settings/profiles/SetupActionsFragment.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/com/android/settings/profiles/SetupActionsFragment.java b/src/com/android/settings/profiles/SetupActionsFragment.java
index baa901e..199e477 100644
--- a/src/com/android/settings/profiles/SetupActionsFragment.java
+++ b/src/com/android/settings/profiles/SetupActionsFragment.java
@@ -40,6 +40,7 @@ import android.net.wimax.WimaxHelper;
import android.nfc.NfcManager;
import android.os.AsyncTask;
import android.os.Bundle;
+import android.preference.SeekBarVolumizer;
import android.provider.Settings;
import android.telecom.TelecomManager;
import android.telephony.TelephonyManager;
@@ -695,8 +696,9 @@ public class SetupActionsFragment extends SettingsPreferenceFragment
}
});
seekBar.setEnabled(streamSettings.isOverride());
- seekBar.setMax(am.getStreamMaxVolume(streamId));
- seekBar.setProgress(streamSettings.getValue());
+ final SeekBarVolumizer volumizer = new SeekBarVolumizer(getActivity(), streamId, null,
+ null);
+ volumizer.setSeekBar(seekBar);
builder.setView(view);
builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override
@@ -710,6 +712,14 @@ public class SetupActionsFragment extends SettingsPreferenceFragment
}
});
builder.setNegativeButton(android.R.string.cancel, null);
+ builder.setOnDismissListener(new DialogInterface.OnDismissListener() {
+ @Override
+ public void onDismiss(DialogInterface dialogInterface) {
+ if (volumizer != null) {
+ volumizer.stop();
+ }
+ }
+ });
builder.show();
}