diff --git a/android/src/main/java/com/shatteredpixel/shatteredpixeldungeon/android/AndroidGame.java b/android/src/main/java/com/shatteredpixel/shatteredpixeldungeon/android/AndroidGame.java index 04cbe92f6..379ab5efc 100644 --- a/android/src/main/java/com/shatteredpixel/shatteredpixeldungeon/android/AndroidGame.java +++ b/android/src/main/java/com/shatteredpixel/shatteredpixeldungeon/android/AndroidGame.java @@ -21,14 +21,11 @@ package com.shatteredpixel.shatteredpixeldungeon.android; -import android.app.Activity; import android.content.pm.ActivityInfo; import android.content.pm.PackageManager; import android.opengl.GLSurfaceView; import android.os.Build; import android.os.Bundle; -import android.telephony.PhoneStateListener; -import android.telephony.TelephonyManager; import com.badlogic.gdx.Files; import com.badlogic.gdx.backends.android.AndroidApplication; @@ -36,7 +33,6 @@ import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; import com.shatteredpixel.shatteredpixeldungeon.SPDSettings; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; import com.watabou.noosa.Game; -import com.watabou.noosa.audio.Music; import com.watabou.utils.FileUtils; public class AndroidGame extends AndroidApplication { @@ -95,28 +91,7 @@ public class AndroidGame extends AndroidApplication { initialize(new ShatteredPixelDungeon(support), config); view = (GLSurfaceView)graphics.getView(); - - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { - TelephonyManager mgr = - (TelephonyManager) instance.getSystemService(Activity.TELEPHONY_SERVICE); - mgr.listen(new PhoneStateListener(){ - - @Override - public void onCallStateChanged(int state, String incomingNumber) - { - if( state == TelephonyManager.CALL_STATE_RINGING ) { - Music.INSTANCE.pause(); - - } else if( state == TelephonyManager.CALL_STATE_IDLE ) { - if (!Game.instance.isPaused()) { - Music.INSTANCE.resume(); - } - } - - super.onCallStateChanged(state, incomingNumber); - } - }, PhoneStateListener.LISTEN_CALL_STATE); - } + } @Override