0.9.8b equalizer
This commit is contained in:
parent
c1a4185549
commit
89e62a2390
37 changed files with 183 additions and 34 deletions
|
|
@ -1,7 +1,9 @@
|
|||
package com.kabouzeid.gramophone.util;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Intent;
|
||||
import android.media.audiofx.AudioEffect;
|
||||
import android.support.v4.app.ActivityCompat;
|
||||
import android.support.v4.app.ActivityOptionsCompat;
|
||||
import android.support.v4.util.Pair;
|
||||
|
|
@ -111,4 +113,20 @@ public class NavigationUtil {
|
|||
Toast.makeText(activity, activity.getResources().getString(R.string.nothing_playing), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
|
||||
public static void openEqualizer(final Activity activity) {
|
||||
final int sessionId = MusicPlayerRemote.getAudioSessionId();
|
||||
if (sessionId == AudioEffect.ERROR_BAD_VALUE) {
|
||||
Toast.makeText(activity, activity.getResources().getString(R.string.no_audio_id), Toast.LENGTH_LONG).show();
|
||||
} else {
|
||||
try {
|
||||
final Intent effects = new Intent(AudioEffect.ACTION_DISPLAY_AUDIO_EFFECT_CONTROL_PANEL);
|
||||
effects.putExtra(AudioEffect.EXTRA_AUDIO_SESSION, sessionId);
|
||||
effects.putExtra(AudioEffect.EXTRA_CONTENT_TYPE, AudioEffect.CONTENT_TYPE_MUSIC);
|
||||
activity.startActivityForResult(effects, 0);
|
||||
} catch (final ActivityNotFoundException notFound) {
|
||||
Toast.makeText(activity, activity.getResources().getString(R.string.no_equalizer), Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public final class PreferenceUtils {
|
|||
case 1:
|
||||
return R.style.Theme_MaterialMusic;
|
||||
}
|
||||
return R.style.Theme_MaterialMusic;
|
||||
return R.style.Theme_MaterialMusic_Light;
|
||||
}
|
||||
|
||||
public void setGeneralTheme(int appTheme) {
|
||||
|
|
@ -144,7 +144,7 @@ public final class PreferenceUtils {
|
|||
}
|
||||
|
||||
public final boolean playbackControllerBoxEnabled() {
|
||||
return mPreferences.getBoolean(PLAYBACK_CONTROLLER_BOX, true);
|
||||
return mPreferences.getBoolean(PLAYBACK_CONTROLLER_BOX, false);
|
||||
}
|
||||
|
||||
public void setPlaybackControllerBoxEnabled(final boolean value) {
|
||||
|
|
@ -154,7 +154,7 @@ public final class PreferenceUtils {
|
|||
}
|
||||
|
||||
public final boolean transparentToolbar() {
|
||||
return mPreferences.getBoolean(TRANSPARENT_TOOLBAR, true);
|
||||
return mPreferences.getBoolean(TRANSPARENT_TOOLBAR, false);
|
||||
}
|
||||
|
||||
public void setTransparentToolbar(final boolean value) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue