Android: Replaced logging tag strings with constant.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Sat, 16 May 2015 21:15:59 +0200
changeset 96023c3800abc52f
parent 9601 4c65108b7ac3
child 9603 8e570fd79352
Android: Replaced logging tag strings with constant.
android-project/src/org/libsdl/app/SDLActivity.java
     1.1 --- a/android-project/src/org/libsdl/app/SDLActivity.java	Sat May 16 21:15:27 2015 +0200
     1.2 +++ b/android-project/src/org/libsdl/app/SDLActivity.java	Sat May 16 21:15:59 2015 +0200
     1.3 @@ -114,9 +114,9 @@
     1.4      // Setup
     1.5      @Override
     1.6      protected void onCreate(Bundle savedInstanceState) {
     1.7 -        Log.v("SDL", "Device: " + android.os.Build.DEVICE);
     1.8 -        Log.v("SDL", "Model: " + android.os.Build.MODEL);
     1.9 -        Log.v("SDL", "onCreate():" + mSingleton);
    1.10 +        Log.v(TAG, "Device: " + android.os.Build.DEVICE);
    1.11 +        Log.v(TAG, "Model: " + android.os.Build.MODEL);
    1.12 +        Log.v(TAG, "onCreate():" + mSingleton);
    1.13          super.onCreate(savedInstanceState);
    1.14  
    1.15          SDLActivity.initialize();
    1.16 @@ -178,7 +178,7 @@
    1.17      // Events
    1.18      @Override
    1.19      protected void onPause() {
    1.20 -        Log.v("SDL", "onPause()");
    1.21 +        Log.v(TAG, "onPause()");
    1.22          super.onPause();
    1.23  
    1.24          if (SDLActivity.mBrokenLibraries) {
    1.25 @@ -190,7 +190,7 @@
    1.26  
    1.27      @Override
    1.28      protected void onResume() {
    1.29 -        Log.v("SDL", "onResume()");
    1.30 +        Log.v(TAG, "onResume()");
    1.31          super.onResume();
    1.32  
    1.33          if (SDLActivity.mBrokenLibraries) {
    1.34 @@ -204,7 +204,7 @@
    1.35      @Override
    1.36      public void onWindowFocusChanged(boolean hasFocus) {
    1.37          super.onWindowFocusChanged(hasFocus);
    1.38 -        Log.v("SDL", "onWindowFocusChanged(): " + hasFocus);
    1.39 +        Log.v(TAG, "onWindowFocusChanged(): " + hasFocus);
    1.40  
    1.41          if (SDLActivity.mBrokenLibraries) {
    1.42             return;
    1.43 @@ -218,7 +218,7 @@
    1.44  
    1.45      @Override
    1.46      public void onLowMemory() {
    1.47 -        Log.v("SDL", "onLowMemory()");
    1.48 +        Log.v(TAG, "onLowMemory()");
    1.49          super.onLowMemory();
    1.50  
    1.51          if (SDLActivity.mBrokenLibraries) {
    1.52 @@ -230,7 +230,7 @@
    1.53  
    1.54      @Override
    1.55      protected void onDestroy() {
    1.56 -        Log.v("SDL", "onDestroy()");
    1.57 +        Log.v(TAG, "onDestroy()");
    1.58  
    1.59          if (SDLActivity.mBrokenLibraries) {
    1.60             super.onDestroy();
    1.61 @@ -248,11 +248,11 @@
    1.62              try {
    1.63                  SDLActivity.mSDLThread.join();
    1.64              } catch(Exception e) {
    1.65 -                Log.v("SDL", "Problem stopping thread: " + e);
    1.66 +                Log.v(TAG, "Problem stopping thread: " + e);
    1.67              }
    1.68              SDLActivity.mSDLThread = null;
    1.69  
    1.70 -            //Log.v("SDL", "Finished waiting for SDL thread");
    1.71 +            //Log.v(TAG, "Finished waiting for SDL thread");
    1.72          }
    1.73  
    1.74          super.onDestroy();
    1.75 @@ -542,7 +542,7 @@
    1.76          int audioFormat = is16Bit ? AudioFormat.ENCODING_PCM_16BIT : AudioFormat.ENCODING_PCM_8BIT;
    1.77          int frameSize = (isStereo ? 2 : 1) * (is16Bit ? 2 : 1);
    1.78  
    1.79 -        Log.v("SDL", "SDL audio: wanted " + (isStereo ? "stereo" : "mono") + " " + (is16Bit ? "16-bit" : "8-bit") + " " + (sampleRate / 1000f) + "kHz, " + desiredFrames + " frames buffer");
    1.80 +        Log.v(TAG, "SDL audio: wanted " + (isStereo ? "stereo" : "mono") + " " + (is16Bit ? "16-bit" : "8-bit") + " " + (sampleRate / 1000f) + "kHz, " + desiredFrames + " frames buffer");
    1.81  
    1.82          // Let the user pick a larger buffer if they really want -- but ye
    1.83          // gods they probably shouldn't, the minimums are horrifyingly high
    1.84 @@ -558,7 +558,7 @@
    1.85              // Ref: http://developer.android.com/reference/android/media/AudioTrack.html#getState()
    1.86  
    1.87              if (mAudioTrack.getState() != AudioTrack.STATE_INITIALIZED) {
    1.88 -                Log.e("SDL", "Failed during initialization of Audio Track");
    1.89 +                Log.e(TAG, "Failed during initialization of Audio Track");
    1.90                  mAudioTrack = null;
    1.91                  return -1;
    1.92              }
    1.93 @@ -566,7 +566,7 @@
    1.94              mAudioTrack.play();
    1.95          }
    1.96  
    1.97 -        Log.v("SDL", "SDL audio: got " + ((mAudioTrack.getChannelCount() >= 2) ? "stereo" : "mono") + " " + ((mAudioTrack.getAudioFormat() == AudioFormat.ENCODING_PCM_16BIT) ? "16-bit" : "8-bit") + " " + (mAudioTrack.getSampleRate() / 1000f) + "kHz, " + desiredFrames + " frames buffer");
    1.98 +        Log.v(TAG, "SDL audio: got " + ((mAudioTrack.getChannelCount() >= 2) ? "stereo" : "mono") + " " + ((mAudioTrack.getAudioFormat() == AudioFormat.ENCODING_PCM_16BIT) ? "16-bit" : "8-bit") + " " + (mAudioTrack.getSampleRate() / 1000f) + "kHz, " + desiredFrames + " frames buffer");
    1.99  
   1.100          return 0;
   1.101      }
   1.102 @@ -586,7 +586,7 @@
   1.103                      // Nom nom
   1.104                  }
   1.105              } else {
   1.106 -                Log.w("SDL", "SDL audio: error return from write(short)");
   1.107 +                Log.w(TAG, "SDL audio: error return from write(short)");
   1.108                  return;
   1.109              }
   1.110          }
   1.111 @@ -607,7 +607,7 @@
   1.112                      // Nom nom
   1.113                  }
   1.114              } else {
   1.115 -                Log.w("SDL", "SDL audio: error return from write(byte)");
   1.116 +                Log.w(TAG, "SDL audio: error return from write(byte)");
   1.117                  return;
   1.118              }
   1.119          }