summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Thompson <david.w.thompson.321@gmail.com>2012-06-05 11:59:06 +0100
committerDavid Thompson <david.w.thompson.321@gmail.com>2012-06-05 12:44:43 +0100
commit6facce5ad2d841cf585b5825ca9aa95a351cf047 (patch)
tree250a6d4aa67ca21937369e4529665b01865c782b
parentc348031b329fcbfd358dfc7a3d39e05fb1c569c7 (diff)
downloaddevice_samsung_tuna-6facce5ad2d841cf585b5825ca9aa95a351cf047.zip
device_samsung_tuna-6facce5ad2d841cf585b5825ca9aa95a351cf047.tar.gz
device_samsung_tuna-6facce5ad2d841cf585b5825ca9aa95a351cf047.tar.bz2
Set vibrator force initial value and default correctly.
The seek bar should set a percentage of the max pwm value (127) not the value itself. Change-Id: I5116f3fc18b544abfee9497808988269e54af441
-rw-r--r--GNexusParts/src/com/cyanogenmod/settings/device/VibratorTuningPreference.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/GNexusParts/src/com/cyanogenmod/settings/device/VibratorTuningPreference.java b/GNexusParts/src/com/cyanogenmod/settings/device/VibratorTuningPreference.java
index 217ffec..af2824c 100644
--- a/GNexusParts/src/com/cyanogenmod/settings/device/VibratorTuningPreference.java
+++ b/GNexusParts/src/com/cyanogenmod/settings/device/VibratorTuningPreference.java
@@ -122,7 +122,7 @@ public class VibratorTuningPreference extends DialogPreference implements OnClic
String sDefaultValue = Utils.readOneLine(filePath);
int iValue = sharedPrefs.getInt(filePath, Integer.valueOf(sDefaultValue));
if (bFirstTime)
- Utils.writeValue(filePath, "127");
+ Utils.writeValue(filePath, "100");
else
Utils.writeValue(filePath, String.valueOf((long) iValue));
}
@@ -246,7 +246,7 @@ public class VibratorTuningPreference extends DialogPreference implements OnClic
int averageValue;
averageValue = (resultVibrator * 100) / 127;
- return resultVibrator;
+ return averageValue;
}
}
@@ -260,7 +260,7 @@ public class VibratorTuningPreference extends DialogPreference implements OnClic
}
private void setDefaultSettings() {
- mSeekBars[0].setNewValue(127);
+ mSeekBars[0].setNewValue(100);
}
}