Bug 906088 - part 1 - pass String[] to PrefsHelper.getPrefs wherever possible; r=blassey

We want JSONArray to go away, since we're going to be transferring strings via JNI.
This commit is contained in:
Nathan Froyd 2013-09-04 09:56:27 -04:00
parent 5292de7eab
commit 7e10e3ef99
2 changed files with 18 additions and 20 deletions

View File

@ -64,13 +64,12 @@ abstract class Axis {
}
static void initPrefs() {
JSONArray prefs = new JSONArray();
prefs.put(PREF_SCROLLING_FRICTION_FAST);
prefs.put(PREF_SCROLLING_FRICTION_SLOW);
prefs.put(PREF_SCROLLING_MAX_EVENT_ACCELERATION);
prefs.put(PREF_SCROLLING_OVERSCROLL_DECEL_RATE);
prefs.put(PREF_SCROLLING_OVERSCROLL_SNAP_LIMIT);
prefs.put(PREF_SCROLLING_MIN_SCROLLABLE_DISTANCE);
final String[] prefs = { PREF_SCROLLING_FRICTION_FAST,
PREF_SCROLLING_FRICTION_SLOW,
PREF_SCROLLING_MAX_EVENT_ACCELERATION,
PREF_SCROLLING_OVERSCROLL_DECEL_RATE,
PREF_SCROLLING_OVERSCROLL_SNAP_LIMIT,
PREF_SCROLLING_MIN_SCROLLABLE_DISTANCE };
PrefsHelper.getPrefs(prefs, new PrefsHelper.PrefHandlerBase() {
Map<String, Integer> mPrefs = new HashMap<String, Integer>();

View File

@ -61,19 +61,18 @@ final class DisplayPortCalculator {
}
static void initPrefs() {
JSONArray prefs = new JSONArray();
prefs.put(PREF_DISPLAYPORT_STRATEGY);
prefs.put(PREF_DISPLAYPORT_FM_MULTIPLIER);
prefs.put(PREF_DISPLAYPORT_FM_DANGER_X);
prefs.put(PREF_DISPLAYPORT_FM_DANGER_Y);
prefs.put(PREF_DISPLAYPORT_VB_MULTIPLIER);
prefs.put(PREF_DISPLAYPORT_VB_VELOCITY_THRESHOLD);
prefs.put(PREF_DISPLAYPORT_VB_REVERSE_BUFFER);
prefs.put(PREF_DISPLAYPORT_VB_DANGER_X_BASE);
prefs.put(PREF_DISPLAYPORT_VB_DANGER_Y_BASE);
prefs.put(PREF_DISPLAYPORT_VB_DANGER_X_INCR);
prefs.put(PREF_DISPLAYPORT_VB_DANGER_Y_INCR);
prefs.put(PREF_DISPLAYPORT_PB_VELOCITY_THRESHOLD);
final String[] prefs = { PREF_DISPLAYPORT_STRATEGY,
PREF_DISPLAYPORT_FM_MULTIPLIER,
PREF_DISPLAYPORT_FM_DANGER_X,
PREF_DISPLAYPORT_FM_DANGER_Y,
PREF_DISPLAYPORT_VB_MULTIPLIER,
PREF_DISPLAYPORT_VB_VELOCITY_THRESHOLD,
PREF_DISPLAYPORT_VB_REVERSE_BUFFER,
PREF_DISPLAYPORT_VB_DANGER_X_BASE,
PREF_DISPLAYPORT_VB_DANGER_Y_BASE,
PREF_DISPLAYPORT_VB_DANGER_X_INCR,
PREF_DISPLAYPORT_VB_DANGER_Y_INCR,
PREF_DISPLAYPORT_PB_VELOCITY_THRESHOLD };
PrefsHelper.getPrefs(prefs, new PrefsHelper.PrefHandlerBase() {
private Map<String, Integer> mValues = new HashMap<String, Integer>();