Merge pull request #2618 from hannesa2/AndroidStudio_3.1
update to AndroidStudio 3.1
This commit is contained in:
commit
ccd29a9991
|
@ -14,7 +14,7 @@ buildscript {
|
||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.8.1'
|
classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.8.2'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,6 +86,7 @@ android {
|
||||||
buildConfigField STRING, FLATTR_APP_SECRET, mFlattrAppSecret
|
buildConfigField STRING, FLATTR_APP_SECRET, mFlattrAppSecret
|
||||||
}
|
}
|
||||||
release {
|
release {
|
||||||
|
resValue "string", "provider_authority", "de.danoeh.antennapod.provider"
|
||||||
minifyEnabled true
|
minifyEnabled true
|
||||||
proguardFile "proguard.cfg"
|
proguardFile "proguard.cfg"
|
||||||
signingConfig signingConfigs.releaseConfig
|
signingConfig signingConfigs.releaseConfig
|
||||||
|
@ -127,13 +128,6 @@ android {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations {
|
|
||||||
freeDebugImplementation
|
|
||||||
freeReleaseImplementation
|
|
||||||
playDebugImplementation
|
|
||||||
playReleaseImplementation
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
freeImplementation project(":core")
|
freeImplementation project(":core")
|
||||||
// free build hack: skip some dependencies
|
// free build hack: skip some dependencies
|
||||||
|
@ -169,7 +163,7 @@ dependencies {
|
||||||
transitive = true
|
transitive = true
|
||||||
}
|
}
|
||||||
implementation "com.yqritc:recyclerview-flexibledivider:$recyclerviewFlexibledividerVersion"
|
implementation "com.yqritc:recyclerview-flexibledivider:$recyclerviewFlexibledividerVersion"
|
||||||
implementation("com.githang:viewpagerindicator:2.5@aar") {
|
implementation("com.githang:viewpagerindicator:2.5.1@aar") {
|
||||||
exclude module: "support-v4"
|
exclude module: "support-v4"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ package de.danoeh.antennapod.activity;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v7.app.ActionBarActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
|
@ -21,7 +21,7 @@ import de.danoeh.antennapod.core.util.flattr.FlattrUtils;
|
||||||
|
|
||||||
/** Guides the user through the authentication process */
|
/** Guides the user through the authentication process */
|
||||||
|
|
||||||
public class FlattrAuthActivity extends ActionBarActivity {
|
public class FlattrAuthActivity extends AppCompatActivity {
|
||||||
private static final String TAG = "FlattrAuthActivity";
|
private static final String TAG = "FlattrAuthActivity";
|
||||||
|
|
||||||
private TextView txtvExplanation;
|
private TextView txtvExplanation;
|
||||||
|
|
12
build.gradle
12
build.gradle
|
@ -7,7 +7,7 @@ buildscript {
|
||||||
google()
|
google()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath "com.android.tools.build:gradle:3.0.1"
|
classpath 'com.android.tools.build:gradle:3.1.0'
|
||||||
classpath "com.github.triplet.gradle:play-publisher:1.2.0"
|
classpath "com.github.triplet.gradle:play-publisher:1.2.0"
|
||||||
// Exclude the version that the android plugin depends on.
|
// Exclude the version that the android plugin depends on.
|
||||||
configurations.classpath.exclude group: "com.android.tools.external.lombok"
|
configurations.classpath.exclude group: "com.android.tools.external.lombok"
|
||||||
|
@ -53,13 +53,13 @@ project.ext {
|
||||||
jsoupVersion = "1.11.2"
|
jsoupVersion = "1.11.2"
|
||||||
materialDialogsVersion = "0.9.0.2"
|
materialDialogsVersion = "0.9.0.2"
|
||||||
okhttpVersion = "3.9.0"
|
okhttpVersion = "3.9.0"
|
||||||
okioVersion = "1.13.0"
|
okioVersion = "1.14.0"
|
||||||
recyclerviewFlexibledividerVersion = "1.2.6"
|
recyclerviewFlexibledividerVersion = "1.4.0"
|
||||||
robotiumSoloVersion = "5.6.3"
|
robotiumSoloVersion = "5.6.3"
|
||||||
rxAndroidVersion = "1.2.1"
|
rxAndroidVersion = "1.2.1"
|
||||||
rxJavaVersion = "1.3.2"
|
rxJavaVersion = "1.3.8"
|
||||||
rxJavaRulesVersion = "1.3.2.0"
|
rxJavaRulesVersion = "1.3.3.0"
|
||||||
triangleLabelViewVersion = "1.1.0"
|
triangleLabelViewVersion = "1.1.2"
|
||||||
|
|
||||||
audioPlayerVersion = "v1.0.17"
|
audioPlayerVersion = "v1.0.17"
|
||||||
|
|
||||||
|
|
|
@ -263,30 +263,21 @@ public class PlaybackService extends MediaBrowserServiceCompat {
|
||||||
Log.d(TAG, "Service created.");
|
Log.d(TAG, "Service created.");
|
||||||
isRunning = true;
|
isRunning = true;
|
||||||
|
|
||||||
registerReceiver(autoStateUpdated, new IntentFilter(
|
registerReceiver(autoStateUpdated, new IntentFilter("com.google.android.gms.car.media.STATUS"));
|
||||||
"com.google.android.gms.car.media.STATUS"));
|
registerReceiver(headsetDisconnected, new IntentFilter(Intent.ACTION_HEADSET_PLUG));
|
||||||
registerReceiver(headsetDisconnected, new IntentFilter(
|
registerReceiver(shutdownReceiver, new IntentFilter(ACTION_SHUTDOWN_PLAYBACK_SERVICE));
|
||||||
Intent.ACTION_HEADSET_PLUG));
|
registerReceiver(bluetoothStateUpdated, new IntentFilter(BluetoothA2dp.ACTION_CONNECTION_STATE_CHANGED));
|
||||||
registerReceiver(shutdownReceiver, new IntentFilter(
|
registerReceiver(audioBecomingNoisy, new IntentFilter(AudioManager.ACTION_AUDIO_BECOMING_NOISY));
|
||||||
ACTION_SHUTDOWN_PLAYBACK_SERVICE));
|
registerReceiver(skipCurrentEpisodeReceiver, new IntentFilter(ACTION_SKIP_CURRENT_EPISODE));
|
||||||
registerReceiver(bluetoothStateUpdated, new IntentFilter(
|
registerReceiver(pausePlayCurrentEpisodeReceiver, new IntentFilter(ACTION_PAUSE_PLAY_CURRENT_EPISODE));
|
||||||
BluetoothA2dp.ACTION_CONNECTION_STATE_CHANGED));
|
registerReceiver(pauseResumeCurrentEpisodeReceiver, new IntentFilter(ACTION_RESUME_PLAY_CURRENT_EPISODE));
|
||||||
registerReceiver(audioBecomingNoisy, new IntentFilter(
|
|
||||||
AudioManager.ACTION_AUDIO_BECOMING_NOISY));
|
|
||||||
registerReceiver(skipCurrentEpisodeReceiver, new IntentFilter(
|
|
||||||
ACTION_SKIP_CURRENT_EPISODE));
|
|
||||||
registerReceiver(pausePlayCurrentEpisodeReceiver, new IntentFilter(
|
|
||||||
ACTION_PAUSE_PLAY_CURRENT_EPISODE));
|
|
||||||
registerReceiver(pauseResumeCurrentEpisodeReceiver, new IntentFilter(
|
|
||||||
ACTION_RESUME_PLAY_CURRENT_EPISODE));
|
|
||||||
taskManager = new PlaybackServiceTaskManager(this, taskManagerCallback);
|
taskManager = new PlaybackServiceTaskManager(this, taskManagerCallback);
|
||||||
|
|
||||||
flavorHelper = new PlaybackServiceFlavorHelper(PlaybackService.this, flavorHelperCallback);
|
flavorHelper = new PlaybackServiceFlavorHelper(PlaybackService.this, flavorHelperCallback);
|
||||||
PreferenceManager.getDefaultSharedPreferences(this)
|
PreferenceManager.getDefaultSharedPreferences(this)
|
||||||
.registerOnSharedPreferenceChangeListener(prefListener);
|
.registerOnSharedPreferenceChangeListener(prefListener);
|
||||||
|
|
||||||
ComponentName eventReceiver = new ComponentName(getApplicationContext(),
|
ComponentName eventReceiver = new ComponentName(getApplicationContext(), MediaButtonReceiver.class);
|
||||||
MediaButtonReceiver.class);
|
|
||||||
Intent mediaButtonIntent = new Intent(Intent.ACTION_MEDIA_BUTTON);
|
Intent mediaButtonIntent = new Intent(Intent.ACTION_MEDIA_BUTTON);
|
||||||
mediaButtonIntent.setComponent(eventReceiver);
|
mediaButtonIntent.setComponent(eventReceiver);
|
||||||
PendingIntent buttonReceiverIntent = PendingIntent.getBroadcast(this, 0, mediaButtonIntent, PendingIntent.FLAG_UPDATE_CURRENT);
|
PendingIntent buttonReceiverIntent = PendingIntent.getBroadcast(this, 0, mediaButtonIntent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||||
|
@ -830,7 +821,7 @@ public class PlaybackService extends MediaBrowserServiceCompat {
|
||||||
/**
|
/**
|
||||||
* This method processes the media object after its playback ended, either because it completed
|
* This method processes the media object after its playback ended, either because it completed
|
||||||
* or because a different media object was selected for playback.
|
* or because a different media object was selected for playback.
|
||||||
*
|
* <p>
|
||||||
* Even though these tasks aren't supposed to be resource intensive, a good practice is to
|
* Even though these tasks aren't supposed to be resource intensive, a good practice is to
|
||||||
* usually call this method on a background thread.
|
* usually call this method on a background thread.
|
||||||
*
|
*
|
||||||
|
@ -1030,6 +1021,7 @@ public class PlaybackService extends MediaBrowserServiceCompat {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the Media Session for the corresponding status.
|
* Updates the Media Session for the corresponding status.
|
||||||
|
*
|
||||||
* @param playerStatus the current {@link PlayerStatus}
|
* @param playerStatus the current {@link PlayerStatus}
|
||||||
*/
|
*/
|
||||||
private void updateMediaSession(final PlayerStatus playerStatus) {
|
private void updateMediaSession(final PlayerStatus playerStatus) {
|
||||||
|
@ -1590,7 +1582,9 @@ public class PlaybackService extends MediaBrowserServiceCompat {
|
||||||
return mediaPlayer.getPlayerStatus();
|
return mediaPlayer.getPlayerStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Playable getPlayable() { return mediaPlayer.getPlayable(); }
|
public Playable getPlayable() {
|
||||||
|
return mediaPlayer.getPlayable();
|
||||||
|
}
|
||||||
|
|
||||||
public boolean canSetSpeed() {
|
public boolean canSetSpeed() {
|
||||||
return mediaPlayer.canSetSpeed();
|
return mediaPlayer.canSetSpeed();
|
||||||
|
@ -1707,7 +1701,6 @@ public class PlaybackService extends MediaBrowserServiceCompat {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onPlay();
|
onPlay();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1795,14 +1788,23 @@ public class PlaybackService extends MediaBrowserServiceCompat {
|
||||||
|
|
||||||
interface FlavorHelperCallback {
|
interface FlavorHelperCallback {
|
||||||
PlaybackServiceMediaPlayer.PSMPCallback getMediaPlayerCallback();
|
PlaybackServiceMediaPlayer.PSMPCallback getMediaPlayerCallback();
|
||||||
|
|
||||||
void setMediaPlayer(PlaybackServiceMediaPlayer mediaPlayer);
|
void setMediaPlayer(PlaybackServiceMediaPlayer mediaPlayer);
|
||||||
|
|
||||||
PlaybackServiceMediaPlayer getMediaPlayer();
|
PlaybackServiceMediaPlayer getMediaPlayer();
|
||||||
|
|
||||||
void setIsCasting(boolean isCasting);
|
void setIsCasting(boolean isCasting);
|
||||||
|
|
||||||
void sendNotificationBroadcast(int type, int code);
|
void sendNotificationBroadcast(int type, int code);
|
||||||
|
|
||||||
void saveCurrentPosition(boolean fromMediaPlayer, Playable playable, int position);
|
void saveCurrentPosition(boolean fromMediaPlayer, Playable playable, int position);
|
||||||
|
|
||||||
void setupNotification(boolean connected, PlaybackServiceMediaPlayer.PSMPInfo info);
|
void setupNotification(boolean connected, PlaybackServiceMediaPlayer.PSMPInfo info);
|
||||||
|
|
||||||
MediaSessionCompat getMediaSession();
|
MediaSessionCompat getMediaSession();
|
||||||
|
|
||||||
Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter);
|
Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter);
|
||||||
|
|
||||||
void unregisterReceiver(BroadcastReceiver receiver);
|
void unregisterReceiver(BroadcastReceiver receiver);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-bin.zip
|
||||||
|
|
Loading…
Reference in New Issue