Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Added missing @OverRide annotations in Java source file to reduce war…
Browse files Browse the repository at this point in the history
…nings.
  • Loading branch information
philippwiesemann committed Apr 27, 2013
1 parent 094204b commit 9f0d1e2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions android-project/src/org/libsdl/app/SDLActivity.java
Expand Up @@ -64,6 +64,7 @@ public class SDLActivity extends Activity {
}

// Setup
@Override
protected void onCreate(Bundle savedInstanceState) {
//Log.v("SDL", "onCreate()");
super.onCreate(savedInstanceState);
Expand Down Expand Up @@ -95,6 +96,7 @@ protected void onResume() {
// Don't call SDLActivity.nativeResume(); here, it will be called via SDLSurface::surfaceChanged->SDLActivity::startApp
}*/

@Override
protected void onDestroy() {
super.onDestroy();
Log.v("SDL", "onDestroy()");
Expand Down Expand Up @@ -220,6 +222,7 @@ public ShowTextInputHandler(int x, int y, int w, int h) {
this.h = h;
}

@Override
public void run() {
AbsoluteLayout.LayoutParams params = new AbsoluteLayout.LayoutParams(
w, h + HEIGHT_PADDING, x, y);
Expand Down Expand Up @@ -372,6 +375,7 @@ public static void audioInit(int sampleRate, boolean is16Bit, boolean isStereo,

public static void audioStartThread() {
mAudioThread = new Thread(new Runnable() {
@Override
public void run() {
mAudioTrack.play();
nativeRunAudioThread();
Expand Down Expand Up @@ -442,6 +446,7 @@ public static void audioQuit() {
Simple nativeInit() runnable
*/
class SDLMain implements Runnable {
@Override
public void run() {
// Runs SDL_main()
SDLActivity.nativeInit();
Expand Down Expand Up @@ -485,13 +490,15 @@ public SDLSurface(Context context) {
}

// Called when we have a valid drawing surface
@Override
public void surfaceCreated(SurfaceHolder holder) {
Log.v("SDL", "surfaceCreated()");
holder.setType(SurfaceHolder.SURFACE_TYPE_GPU);
enableSensor(Sensor.TYPE_ACCELEROMETER, true);
}

// Called when we lose the surface
@Override
public void surfaceDestroyed(SurfaceHolder holder) {
Log.v("SDL", "surfaceDestroyed()");
if (!SDLActivity.mIsPaused) {
Expand All @@ -502,6 +509,7 @@ public void surfaceDestroyed(SurfaceHolder holder) {
}

// Called when the surface is resized
@Override
public void surfaceChanged(SurfaceHolder holder,
int format, int width, int height) {
Log.v("SDL", "surfaceChanged()");
Expand Down Expand Up @@ -560,12 +568,14 @@ public void surfaceChanged(SurfaceHolder holder,
}

// unused
@Override
public void onDraw(Canvas canvas) {}




// Key events
@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {

if (event.getAction() == KeyEvent.ACTION_DOWN) {
Expand All @@ -583,6 +593,7 @@ else if (event.getAction() == KeyEvent.ACTION_UP) {
}

// Touch events
@Override
public boolean onTouch(View v, MotionEvent event) {
{
final int touchDevId = event.getDeviceId();
Expand Down Expand Up @@ -626,10 +637,12 @@ public void enableSensor(int sensortype, boolean enabled) {
}
}

@Override
public void onAccuracyChanged(Sensor sensor, int accuracy) {
// TODO
}

@Override
public void onSensorChanged(SensorEvent event) {
if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {
SDLActivity.onNativeAccel(event.values[0] / SensorManager.GRAVITY_EARTH,
Expand Down Expand Up @@ -658,6 +671,7 @@ public boolean onCheckIsTextEditor() {
return true;
}

@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {

// This handles the hardware keyboard input
Expand Down

0 comments on commit 9f0d1e2

Please sign in to comment.