Fixed some lint errors
Signed-off-by: Ricky Barrette <rickbarrette@gmail.com>
This commit is contained in:
@@ -1,50 +0,0 @@
|
||||
/**
|
||||
* @author Twenty Codes, LLC
|
||||
* @author ricky barrette
|
||||
* @date Nov 3, 2010
|
||||
*/
|
||||
package com.TwentyCodes.android.SkyHook;
|
||||
|
||||
import com.TwentyCodes.android.location.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
|
||||
/**
|
||||
* this activity will be used to display the Twenty Codes, LLC and Skyhook Wireless Splash Screen
|
||||
* @author ricky barrette
|
||||
*/
|
||||
public class Splash extends Activity {
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState){
|
||||
setContentView(R.layout.powered_by_skyhook);
|
||||
|
||||
new Handler().postDelayed( new Runnable() {
|
||||
@Override
|
||||
public void run(){
|
||||
finish();
|
||||
}
|
||||
} , 1500L);
|
||||
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
/**
|
||||
* a convince method for starting the splash screen activity
|
||||
* @param context
|
||||
* @return a runnable that will start the splash screen
|
||||
* @author ricky barrette
|
||||
*/
|
||||
public static Runnable showSpashScreen(final Context context){
|
||||
return new Runnable() {
|
||||
@Override
|
||||
public void run(){
|
||||
context.startActivity(new Intent(context, com.TwentyCodes.android.SkyHook.Splash.class));
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -46,12 +46,23 @@ public class CompassSensor{
|
||||
public static final String TAG = "CompassSensor";
|
||||
private static final int BEARING = 0;
|
||||
private final Display mDisplay;
|
||||
private final Handler mHandler;
|
||||
private static final Handler mHandler;
|
||||
private final SensorManager mSensorManager;
|
||||
private final Context mContext;
|
||||
private CompassListener mListener;
|
||||
private static CompassListener mListener;
|
||||
private float mDelination = 0;
|
||||
|
||||
static{
|
||||
mHandler = new Handler(){
|
||||
@Override
|
||||
public void handleMessage(Message msg){
|
||||
if(mListener != null)
|
||||
if(msg.what == BEARING)
|
||||
mListener.onCompassUpdate((Float) msg.obj);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private final SensorEventListener mCallBack = new SensorEventListener() {
|
||||
|
||||
private float[] mRotationMatrix = new float[16];
|
||||
@@ -173,15 +184,6 @@ public class CompassSensor{
|
||||
public CompassSensor(final Context context) {
|
||||
mContext = context;
|
||||
mDisplay = ((WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
|
||||
mHandler = new Handler(){
|
||||
@Override
|
||||
public void handleMessage(Message msg){
|
||||
if(mListener != null)
|
||||
if(msg.what == BEARING)
|
||||
mListener.onCompassUpdate((Float) msg.obj);
|
||||
}
|
||||
};
|
||||
|
||||
mSensorManager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user