Loading core/java/com/android/internal/widget/RotarySelector.java +18 −1 Original line number Diff line number Diff line Loading @@ -931,7 +931,8 @@ public class RotarySelector extends View { mVibrator = (android.os.Vibrator) getContext().getSystemService(Context.VIBRATOR_SERVICE); } mVibrator.vibrate(Integer.parseInt((Settings.System.getString(getContext().getContentResolver(),Settings.System.HAPTIC_DOWN_ARRAY)).split( ",\\s*" )[0])); long[] hapFeedback = stringToLongArray(Settings.System.getString(getContext().getContentResolver(),Settings.System.HAPTIC_DOWN_ARRAY)); mVibrator.vibrate(hapFeedback, -1); } /** Loading Loading @@ -1081,6 +1082,22 @@ public class RotarySelector extends View { mTime12_24=time12_24; } private long[] stringToLongArray(String inpString) { if (inpString == null) { long[] returnLong = new long[1]; returnLong[0] = 0; return returnLong; } String[] splitStr = inpString.split(","); int los = splitStr.length; long[] returnLong = new long[los]; int i; for (i = 0; i < los; i++) { returnLong[i] = Long.parseLong(splitStr[i].trim()); } return returnLong; } // Debugging / testing code private void log(String msg) { Loading core/java/com/android/internal/widget/SlidingTab.java +18 −1 Original line number Diff line number Diff line Loading @@ -809,7 +809,8 @@ public class SlidingTab extends ViewGroup { mVibrator = (android.os.Vibrator) getContext().getSystemService(Context.VIBRATOR_SERVICE); } mVibrator.vibrate(Integer.parseInt((Settings.System.getString(getContext().getContentResolver(),Settings.System.HAPTIC_DOWN_ARRAY)).split( ",\\s*" )[0])); long[] hapFeedback = stringToLongArray(Settings.System.getString(getContext().getContentResolver(),Settings.System.HAPTIC_DOWN_ARRAY)); mVibrator.vibrate(hapFeedback, -1); } /** Loading Loading @@ -845,6 +846,22 @@ public class SlidingTab extends ViewGroup { } } private long[] stringToLongArray(String inpString) { if (inpString == null) { long[] returnLong = new long[1]; returnLong[0] = 0; return returnLong; } String[] splitStr = inpString.split(","); int los = splitStr.length; long[] returnLong = new long[los]; int i; for (i = 0; i < los; i++) { returnLong[i] = Long.parseLong(splitStr[i].trim()); } return returnLong; } private void log(String msg) { Log.d(LOG_TAG, msg); } Loading Loading
core/java/com/android/internal/widget/RotarySelector.java +18 −1 Original line number Diff line number Diff line Loading @@ -931,7 +931,8 @@ public class RotarySelector extends View { mVibrator = (android.os.Vibrator) getContext().getSystemService(Context.VIBRATOR_SERVICE); } mVibrator.vibrate(Integer.parseInt((Settings.System.getString(getContext().getContentResolver(),Settings.System.HAPTIC_DOWN_ARRAY)).split( ",\\s*" )[0])); long[] hapFeedback = stringToLongArray(Settings.System.getString(getContext().getContentResolver(),Settings.System.HAPTIC_DOWN_ARRAY)); mVibrator.vibrate(hapFeedback, -1); } /** Loading Loading @@ -1081,6 +1082,22 @@ public class RotarySelector extends View { mTime12_24=time12_24; } private long[] stringToLongArray(String inpString) { if (inpString == null) { long[] returnLong = new long[1]; returnLong[0] = 0; return returnLong; } String[] splitStr = inpString.split(","); int los = splitStr.length; long[] returnLong = new long[los]; int i; for (i = 0; i < los; i++) { returnLong[i] = Long.parseLong(splitStr[i].trim()); } return returnLong; } // Debugging / testing code private void log(String msg) { Loading
core/java/com/android/internal/widget/SlidingTab.java +18 −1 Original line number Diff line number Diff line Loading @@ -809,7 +809,8 @@ public class SlidingTab extends ViewGroup { mVibrator = (android.os.Vibrator) getContext().getSystemService(Context.VIBRATOR_SERVICE); } mVibrator.vibrate(Integer.parseInt((Settings.System.getString(getContext().getContentResolver(),Settings.System.HAPTIC_DOWN_ARRAY)).split( ",\\s*" )[0])); long[] hapFeedback = stringToLongArray(Settings.System.getString(getContext().getContentResolver(),Settings.System.HAPTIC_DOWN_ARRAY)); mVibrator.vibrate(hapFeedback, -1); } /** Loading Loading @@ -845,6 +846,22 @@ public class SlidingTab extends ViewGroup { } } private long[] stringToLongArray(String inpString) { if (inpString == null) { long[] returnLong = new long[1]; returnLong[0] = 0; return returnLong; } String[] splitStr = inpString.split(","); int los = splitStr.length; long[] returnLong = new long[los]; int i; for (i = 0; i < los; i++) { returnLong[i] = Long.parseLong(splitStr[i].trim()); } return returnLong; } private void log(String msg) { Log.d(LOG_TAG, msg); } Loading