summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/profiles
diff options
context:
space:
mode:
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();
}