@Override
 public void onDestroy() {
   super.onDestroy();
   mHandler.removeCallbacks(mUpdateDisplay);
   cleanUp();
   Log.d(TAG, ".onDestroy()");
 }
 @Override
 public void onOffsetsChanged(
     float xOffset,
     float yOffset,
     float xOffsetStep,
     float yOffsetStep,
     int xPixelOffset,
     int yPixelOffset) {
   super.onOffsetsChanged(
       xOffset, yOffset, xOffsetStep, yOffsetStep, xPixelOffset, yPixelOffset);
   int xStep = 1;
   int yStep = 1;
   if (xOffsetStep > 0) xStep = Math.round(1f / xOffsetStep) + 1;
   if (yOffsetStep > 0) yStep = Math.round(1f / yOffsetStep) + 1;
   if (xOffsetStep == 1 && xOffset == 0.5) xStep = 1;
   if (yOffsetStep == 1 && yOffset == 0.5) yStep = 1;
   if (yStep != this.ySteps || xStep != this.xSteps) this.replaceRequired = true;
   synchronized (this) {
     this.xSteps = xStep;
     this.ySteps = yStep;
     this.xPos = xOffset;
     this.yPos = yOffset;
     this.redrawRequired = true;
     updateSize();
   }
   redrawImage();
 }
 @Override
 public void onDesiredSizeChanged(int desiredWidth, int desiredHeight) {
   super.onDesiredSizeChanged(desiredWidth, desiredHeight);
   synchronized (this) {
     updateSize();
     this.redrawRequired = true;
     this.replaceRequired = true;
   }
   redrawImage();
 }
 /*
 ====================CALLBACKS==========================
 */
 @Override
 public void onCreate(SurfaceHolder surfaceHolder) {
   super.onCreate(surfaceHolder);
   Log.d(TAG, ".onCreate()");
   contentResolver = getContentResolver();
   fetchAudio = new FetchAudio(contentResolver);
   mPlayer = MediaPlayer.create(getApplicationContext(), fetchAudio.getRandomTrack().getURI());
   link(mPlayer);
   addBarGraphRenderers();
   mPlayer.start();
   mHandler.removeCallbacks(mUpdateDisplay);
   mHandler.postDelayed(mUpdateDisplay, 200);
 }
 @Override
 public void onVisibilityChanged(boolean visible) {
   super.onVisibilityChanged(visible);
   if (visible) updateSize();
   if (visible && this.redrawRequired) redrawImage();
 }
 @Override
 public void onSurfaceDestroyed(SurfaceHolder holder) {
   super.onSurfaceDestroyed(holder);
   handler.removeCallbacks(timerRefresh);
   handler.removeCallbacks(timerGetImages);
 }
 @Override
 public void onSurfaceChanged(SurfaceHolder holder, int format, int width, int height) {
   super.onSurfaceChanged(holder, format, width, height);
   this.replaceRequired = true;
   updateSize();
 }
 @Override
 public void onDestroy() {
   super.onDestroy();
   handler.removeCallbacks(timerRefresh);
   handler.removeCallbacks(timerGetImages);
 }
 @Override
 public void onCreate(SurfaceHolder surfaceHolder) {
   super.onCreate(surfaceHolder);
   this.replaceRequired = true;
   updateSize();
 }
 @Override
 public void onVisibilityChanged(boolean visible) {
   super.onVisibilityChanged(visible);
   Log.d(TAG, ".onVisibilityChanged()");
 }
 @Override
 public void onSurfaceChanged(SurfaceHolder holder, int format, int width, int height) {
   super.onSurfaceChanged(holder, format, width, height);
   Log.d(TAG, ".onSurfaceChanged()");
 }
 @Override
 public void onSurfaceDestroyed(SurfaceHolder holder) {
   super.onSurfaceDestroyed(holder);
   Log.d(TAG, ".onSurfaceDestroyed()");
 }