@@ -31,14 +31,14 @@ public class Hardware {
3131 /**
3232 * Vibrate for s seconds.
3333 */
34- static void vibrate (double s ) {
34+ public static void vibrate (double s ) {
3535 Vibrator v = (Vibrator ) context .getSystemService (Context .VIBRATOR_SERVICE );
3636 if (v != null ) {
3737 v .vibrate ((int ) (1000 * s ));
3838 }
3939 }
4040
41- static SensorEvent lastEvent = null ;
41+ public static SensorEvent lastEvent = null ;
4242
4343 static class AccelListener implements SensorEventListener {
4444 public void onSensorChanged (SensorEvent ev ) {
@@ -55,7 +55,7 @@ public void onAccuracyChanged(Sensor sensor , int accuracy) {
5555 /**
5656 * Enable or Disable the accelerometer.
5757 */
58- static void accelerometerEnable (boolean enable ) {
58+ public static void accelerometerEnable (boolean enable ) {
5959 SensorManager sm = (SensorManager ) context .getSystemService (Context .SENSOR_SERVICE );
6060 Sensor accel = sm .getDefaultSensor (Sensor .TYPE_ACCELEROMETER );
6161
@@ -72,7 +72,7 @@ static void accelerometerEnable(boolean enable) {
7272 }
7373
7474
75- static float [] accelerometerReading () {
75+ public static float [] accelerometerReading () {
7676 if (lastEvent != null ) {
7777 return lastEvent .values ;
7878 } else {
@@ -86,22 +86,22 @@ static float[] accelerometerReading() {
8686 /**
8787 * Get display DPI.
8888 */
89- static int getDPI () {
89+ public static int getDPI () {
9090 return metrics .densityDpi ;
9191 }
9292
9393 /**
9494 * Show the soft keyboard.
9595 */
96- static void showKeyboard () {
96+ public static void showKeyboard () {
9797 InputMethodManager imm = (InputMethodManager ) context .getSystemService (Context .INPUT_METHOD_SERVICE );
9898 imm .showSoftInput (view , InputMethodManager .SHOW_FORCED );
9999 }
100100
101101 /**
102102 * Hide the soft keyboard.
103103 */
104- static void hideKeyboard () {
104+ public static void hideKeyboard () {
105105 InputMethodManager imm = (InputMethodManager ) context .getSystemService (Context .INPUT_METHOD_SERVICE );
106106 imm .hideSoftInputFromWindow (view .getWindowToken (), 0 );
107107 }
@@ -111,7 +111,7 @@ static void hideKeyboard() {
111111 */
112112 static List <ScanResult > latestResult ;
113113
114- static void enableWifiScanner ()
114+ public static void enableWifiScanner ()
115115 {
116116 IntentFilter i = new IntentFilter ();
117117 i .addAction (WifiManager .SCAN_RESULTS_AVAILABLE_ACTION );
@@ -129,7 +129,7 @@ public void onReceive(Context c, Intent i) {
129129
130130 }
131131
132- static String scanWifi () {
132+ public static String scanWifi () {
133133
134134 // Now you can call this and it should execute the broadcastReceiver's
135135 // onReceive()
0 commit comments