Compare commits
No commits in common. "rasp" and "master" have entirely different histories.
@ -1,6 +1,11 @@
|
|||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
lintOptions {
|
||||||
|
disable 'MissingTranslation'
|
||||||
|
disable 'ExtraTranslation'
|
||||||
|
}
|
||||||
|
|
||||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
@ -19,9 +24,7 @@ android {
|
|||||||
|
|
||||||
lintOptions {
|
lintOptions {
|
||||||
abortOnError false
|
abortOnError false
|
||||||
disable 'MissingTranslation', 'ExtraTranslation'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
@ -31,14 +31,10 @@ THE SOFTWARE.
|
|||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||||
<!-- This is needed for isWiredHeadsetOn() to work in some cases. (bug?) -->
|
<!-- This is needed for isWiredHeadsetOn() to work in some cases. (bug?) -->
|
||||||
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>
|
|
||||||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
|
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
|
||||||
<!-- Playlist shortcuts -->
|
<!-- Playlist shortcuts -->
|
||||||
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
|
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
|
||||||
|
|
||||||
<!-- Needed for resume playback on bluetooth headset connected feature -->
|
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
|
||||||
|
|
||||||
<!-- Allow us to query plugins -->
|
<!-- Allow us to query plugins -->
|
||||||
<queries>
|
<queries>
|
||||||
<intent>
|
<intent>
|
||||||
|
@ -445,8 +445,8 @@ public class MediaScanner implements Handler.Callback {
|
|||||||
if (!dir.isDirectory())
|
if (!dir.isDirectory())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// if (new File(dir, ".nomedia").exists())
|
if (new File(dir, ".nomedia").exists())
|
||||||
// return;
|
return;
|
||||||
|
|
||||||
if (isDotfile(dir))
|
if (isDotfile(dir))
|
||||||
return;
|
return;
|
||||||
|
@ -36,12 +36,9 @@ import android.content.res.Resources;
|
|||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.os.Build;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Environment;
|
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Message;
|
import android.os.Message;
|
||||||
import android.provider.Settings;
|
|
||||||
import android.support.iosched.tabs.VanillaTabLayout;
|
import android.support.iosched.tabs.VanillaTabLayout;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
@ -57,7 +54,6 @@ import android.widget.TextView;
|
|||||||
import android.widget.SearchView;
|
import android.widget.SearchView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.annotation.RequiresApi;
|
|
||||||
import androidx.viewpager.widget.ViewPager;
|
import androidx.viewpager.widget.ViewPager;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@ -159,7 +155,6 @@ public class LibraryActivity
|
|||||||
private LibraryAdapter mCurrentAdapter;
|
private LibraryAdapter mCurrentAdapter;
|
||||||
|
|
||||||
|
|
||||||
@RequiresApi(api = Build.VERSION_CODES.R)
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle state)
|
public void onCreate(Bundle state)
|
||||||
{
|
{
|
||||||
@ -193,11 +188,6 @@ public class LibraryActivity
|
|||||||
PermissionRequestActivity.showWarning(this, getIntent());
|
PermissionRequestActivity.showWarning(this, getIntent());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Environment.isExternalStorageManager()) {
|
|
||||||
Intent intent = new Intent(Settings.ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION);
|
|
||||||
startActivity(intent);
|
|
||||||
}
|
|
||||||
|
|
||||||
mVanillaTabLayout = (VanillaTabLayout)findViewById(R.id.sliding_tabs);
|
mVanillaTabLayout = (VanillaTabLayout)findViewById(R.id.sliding_tabs);
|
||||||
mVanillaTabLayout.setOnPageChangeListener(pagerAdapter);
|
mVanillaTabLayout.setOnPageChangeListener(pagerAdapter);
|
||||||
|
|
||||||
|
@ -26,15 +26,11 @@ package ch.blinkenlights.android.vanilla;
|
|||||||
import ch.blinkenlights.android.medialibrary.MediaLibrary;
|
import ch.blinkenlights.android.medialibrary.MediaLibrary;
|
||||||
import ch.blinkenlights.android.medialibrary.LibraryObserver;
|
import ch.blinkenlights.android.medialibrary.LibraryObserver;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.app.Notification;
|
import android.app.Notification;
|
||||||
import android.app.PendingIntent;
|
import android.app.PendingIntent;
|
||||||
import android.app.Service;
|
import android.app.Service;
|
||||||
import android.app.backup.BackupManager;
|
import android.app.backup.BackupManager;
|
||||||
import android.appwidget.AppWidgetManager;
|
import android.appwidget.AppWidgetManager;
|
||||||
import android.bluetooth.BluetoothDevice;
|
|
||||||
import android.bluetooth.BluetoothHeadset;
|
|
||||||
import android.bluetooth.BluetoothProfile;
|
|
||||||
import android.content.BroadcastReceiver;
|
import android.content.BroadcastReceiver;
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@ -441,7 +437,6 @@ public final class PlaybackService extends Service
|
|||||||
*/
|
*/
|
||||||
private BastpUtil mBastpUtil;
|
private BastpUtil mBastpUtil;
|
||||||
|
|
||||||
@SuppressLint("InvalidWakeLockTag")
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate()
|
public void onCreate()
|
||||||
{
|
{
|
||||||
@ -501,7 +496,6 @@ public final class PlaybackService extends Service
|
|||||||
IntentFilter filter = new IntentFilter();
|
IntentFilter filter = new IntentFilter();
|
||||||
filter.addAction(AudioManager.ACTION_AUDIO_BECOMING_NOISY);
|
filter.addAction(AudioManager.ACTION_AUDIO_BECOMING_NOISY);
|
||||||
filter.addAction(Intent.ACTION_SCREEN_ON);
|
filter.addAction(Intent.ACTION_SCREEN_ON);
|
||||||
filter.addAction(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED);
|
|
||||||
registerReceiver(mReceiver, filter);
|
registerReceiver(mReceiver, filter);
|
||||||
|
|
||||||
MediaLibrary.registerLibraryObserver(mObserver);
|
MediaLibrary.registerLibraryObserver(mObserver);
|
||||||
@ -1163,7 +1157,7 @@ public final class PlaybackService extends Service
|
|||||||
|
|
||||||
long[] androidIds = MediaUtils.getAndroidMediaIds(getApplicationContext(), song);
|
long[] androidIds = MediaUtils.getAndroidMediaIds(getApplicationContext(), song);
|
||||||
if (mStockBroadcast) {
|
if (mStockBroadcast) {
|
||||||
Intent intent = new Intent("com.android.music.playstatechanged"); // TODO: Scrobbler interface
|
Intent intent = new Intent("com.android.music.playstatechanged");
|
||||||
intent.putExtra("playing", (mState & FLAG_PLAYING) != 0);
|
intent.putExtra("playing", (mState & FLAG_PLAYING) != 0);
|
||||||
intent.putExtra("track", song.title);
|
intent.putExtra("track", song.title);
|
||||||
intent.putExtra("album", song.album);
|
intent.putExtra("album", song.album);
|
||||||
@ -1480,22 +1474,6 @@ public final class PlaybackService extends Service
|
|||||||
}
|
}
|
||||||
} else if (Intent.ACTION_SCREEN_ON.equals(action)) {
|
} else if (Intent.ACTION_SCREEN_ON.equals(action)) {
|
||||||
userActionTriggered();
|
userActionTriggered();
|
||||||
} else if (BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED.equals(action)) {
|
|
||||||
// Resume playback on bluetooth headset connected
|
|
||||||
// TODO: Resume playback only if playback was paused by BECOMING NOISY
|
|
||||||
int state = intent.getIntExtra(BluetoothProfile.EXTRA_STATE, -1);
|
|
||||||
int prevState = intent.getIntExtra(BluetoothProfile.EXTRA_PREVIOUS_STATE, -1);
|
|
||||||
BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
|
|
||||||
|
|
||||||
if (state == BluetoothProfile.STATE_CONNECTED) {
|
|
||||||
// Move to -2.8 secs on resume
|
|
||||||
int deltedPosition = getPosition() - 2800;
|
|
||||||
if (deltedPosition > 0) {
|
|
||||||
seekToPosition(deltedPosition);
|
|
||||||
}
|
|
||||||
|
|
||||||
play();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ public class PlaylistObserver extends SQLiteOpenHelper implements Handler.Callba
|
|||||||
/**
|
/**
|
||||||
* Extension to use for M3U files
|
* Extension to use for M3U files
|
||||||
*/
|
*/
|
||||||
private static final String M3U_EXT = ".m3u8";
|
private static final String M3U_EXT = ".m3u";
|
||||||
/**
|
/**
|
||||||
* Line comment prefix for M3U files
|
* Line comment prefix for M3U files
|
||||||
*/
|
*/
|
||||||
|
@ -4,7 +4,7 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:7.2.2'
|
classpath 'com.android.tools.build:gradle:4.0.0'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
allprojects {
|
allprojects {
|
||||||
|
7
gradle/wrapper/gradle-wrapper.properties
vendored
7
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,7 @@
|
|||||||
#Sun Aug 14 22:38:11 MSK 2022
|
#Wed Jun 27 14:32:00 EDT 2018
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
|
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStorePath=wrapper/dists
|
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
zipStorePath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
|
||||||
|
distributionSha256Sum=10065868c78f1207afb3a92176f99a37d753a513dff453abb6b5cceda4058cda
|
||||||
|
Loading…
x
Reference in New Issue
Block a user