mirror of
https://github.com/playmusicexporter/playmusicexporter
synced 2024-05-29 08:50:00 +00:00
Merge branch 'feature/appintro' into develop
This commit is contained in:
commit
903743e68e
|
@ -37,7 +37,7 @@
|
||||||
<ConfirmationsSetting value="0" id="Add" />
|
<ConfirmationsSetting value="0" id="Add" />
|
||||||
<ConfirmationsSetting value="0" id="Remove" />
|
<ConfirmationsSetting value="0" id="Remove" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
|
|
@ -27,7 +27,7 @@ android {
|
||||||
buildToolsVersion "25.0.2"
|
buildToolsVersion "25.0.2"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 9
|
minSdkVersion 11
|
||||||
targetSdkVersion 25
|
targetSdkVersion 25
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0"
|
versionName "1.0"
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
<facet type="android" name="Android">
|
<facet type="android" name="Android">
|
||||||
<configuration>
|
<configuration>
|
||||||
<option name="SELECTED_BUILD_VARIANT" value="debug" />
|
<option name="SELECTED_BUILD_VARIANT" value="debug" />
|
||||||
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
|
|
||||||
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
|
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
|
||||||
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
|
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
|
||||||
<afterSyncTasks>
|
<afterSyncTasks>
|
||||||
|
@ -20,7 +19,7 @@
|
||||||
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
|
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
|
||||||
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
|
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
|
||||||
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
|
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
|
||||||
<option name="LIBRARY_PROJECT" value="true" />
|
<option name="PROJECT_TYPE" value="1" />
|
||||||
</configuration>
|
</configuration>
|
||||||
</facet>
|
</facet>
|
||||||
</component>
|
</component>
|
||||||
|
@ -48,7 +47,6 @@
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
|
||||||
|
@ -56,7 +54,6 @@
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/jni" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
|
||||||
|
@ -64,25 +61,22 @@
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotations" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotations" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" />
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
|
|
||||||
package de.arcus.framework.superuser;
|
package de.arcus.framework.superuser;
|
||||||
|
|
||||||
|
import android.os.AsyncTask;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import de.arcus.framework.logger.Logger;
|
import de.arcus.framework.logger.Logger;
|
||||||
|
@ -130,4 +132,20 @@ public class SuperUser {
|
||||||
sessionStop();
|
sessionStop();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void askForPermissionInBackground(final SuperUserPermissionRequestListener listener) {
|
||||||
|
new AsyncTask<Void, Void, Void>() {
|
||||||
|
boolean hasPermissions;
|
||||||
|
@Override
|
||||||
|
protected Void doInBackground(Void... params) {
|
||||||
|
hasPermissions = askForPermissions();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onPostExecute(Void result) {
|
||||||
|
listener.superUserGranted(hasPermissions);
|
||||||
|
}
|
||||||
|
}.execute();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
package de.arcus.framework.superuser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by jcgruenhage on 1/18/17.
|
||||||
|
*/
|
||||||
|
|
||||||
|
public interface SuperUserPermissionRequestListener {
|
||||||
|
void superUserGranted(boolean granted);
|
||||||
|
}
|
|
@ -32,7 +32,7 @@
|
||||||
# Specifies the JVM arguments used for the daemon process.
|
# Specifies the JVM arguments used for the daemon process.
|
||||||
# The setting is particularly useful for tweaking memory settings.
|
# The setting is particularly useful for tweaking memory settings.
|
||||||
# Default value: -Xmx10248m -XX:MaxPermSize=256m
|
# Default value: -Xmx10248m -XX:MaxPermSize=256m
|
||||||
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
||||||
|
|
||||||
# When configured, Gradle will run in incubating parallel mode.
|
# When configured, Gradle will run in incubating parallel mode.
|
||||||
# This option should only be used with decoupled projects. More details, visit
|
# This option should only be used with decoupled projects. More details, visit
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
<facet type="android" name="Android">
|
<facet type="android" name="Android">
|
||||||
<configuration>
|
<configuration>
|
||||||
<option name="SELECTED_BUILD_VARIANT" value="debug" />
|
<option name="SELECTED_BUILD_VARIANT" value="debug" />
|
||||||
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
|
|
||||||
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
|
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
|
||||||
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
|
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
|
||||||
<afterSyncTasks>
|
<afterSyncTasks>
|
||||||
|
@ -23,7 +22,7 @@
|
||||||
</configuration>
|
</configuration>
|
||||||
</facet>
|
</facet>
|
||||||
</component>
|
</component>
|
||||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
|
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="false">
|
||||||
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
|
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
|
||||||
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" />
|
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" />
|
||||||
<exclude-output />
|
<exclude-output />
|
||||||
|
@ -47,7 +46,6 @@
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
|
||||||
|
@ -55,7 +53,6 @@
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/jni" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
|
||||||
|
@ -63,7 +60,6 @@
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
|
||||||
|
@ -71,7 +67,6 @@
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
|
||||||
|
@ -79,7 +74,6 @@
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
|
||||||
|
@ -98,10 +92,13 @@
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/25.1.0/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/25.1.0/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/25.1.0/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-vector-drawable/25.1.0/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/transition/25.1.0/jars" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/transition/25.1.0/jars" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.github.paolorotolo/appintro/4.1.0/jars" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/packaged" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
|
||||||
|
@ -126,6 +123,7 @@
|
||||||
<orderEntry type="library" exported="" name="appcompat-v7-25.1.0" level="project" />
|
<orderEntry type="library" exported="" name="appcompat-v7-25.1.0" level="project" />
|
||||||
<orderEntry type="library" exported="" name="recyclerview-v7-25.1.0" level="project" />
|
<orderEntry type="library" exported="" name="recyclerview-v7-25.1.0" level="project" />
|
||||||
<orderEntry type="library" exported="" name="support-core-utils-25.1.0" level="project" />
|
<orderEntry type="library" exported="" name="support-core-utils-25.1.0" level="project" />
|
||||||
|
<orderEntry type="library" exported="" name="appintro-4.1.0" level="project" />
|
||||||
<orderEntry type="module" module-name="playmusiclib" exported="" />
|
<orderEntry type="module" module-name="playmusiclib" exported="" />
|
||||||
<orderEntry type="module" module-name="framework" exported="" />
|
<orderEntry type="module" module-name="framework" exported="" />
|
||||||
<orderEntry type="library" exported="" name="mp3agic-0.8.4" level="project" />
|
<orderEntry type="library" exported="" name="mp3agic-0.8.4" level="project" />
|
||||||
|
|
|
@ -48,11 +48,15 @@
|
||||||
android:name="android.support.PARENT_ACTIVITY"
|
android:name="android.support.PARENT_ACTIVITY"
|
||||||
android:value=".activities.MusicContainerListActivity" />
|
android:value=".activities.MusicContainerListActivity" />
|
||||||
</activity>
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name=".activities.Intro"
|
||||||
|
android:label="Play Music Exporter Intro"/>
|
||||||
|
|
||||||
<service android:name=".services.ExportService" />
|
<service android:name=".services.ExportService" />
|
||||||
<service android:name=".services.ExportAllService" />
|
<service android:name=".services.ExportAllService" />
|
||||||
<service android:name=".services.ExportAllJob"
|
<service
|
||||||
android:permission="android.permission.BIND_JOB_SERVICE"/>
|
android:name=".services.ExportAllJob"
|
||||||
|
android:permission="android.permission.BIND_JOB_SERVICE" />
|
||||||
|
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="crashhandler.email"
|
android:name="crashhandler.email"
|
||||||
|
|
|
@ -0,0 +1,181 @@
|
||||||
|
package re.jcg.playmusicexporter.activities;
|
||||||
|
|
||||||
|
import android.Manifest;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.pm.PackageManager;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.os.AsyncTask;
|
||||||
|
import android.os.Build;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.support.annotation.Nullable;
|
||||||
|
import android.support.v4.app.ActivityCompat;
|
||||||
|
import android.support.v4.app.Fragment;
|
||||||
|
import android.support.v4.content.ContextCompat;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.github.paolorotolo.appintro.AppIntro;
|
||||||
|
import com.github.paolorotolo.appintro.AppIntroFragment;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import de.arcus.framework.superuser.SuperUser;
|
||||||
|
import re.jcg.playmusicexporter.R;
|
||||||
|
import re.jcg.playmusicexporter.settings.PlayMusicExporterPreferences;
|
||||||
|
|
||||||
|
public class Intro extends AppIntro {
|
||||||
|
private static final String TAG = "PME_Intro";
|
||||||
|
private static final int PERMISSIONS_REQUEST_WRITE_EXTERNAL_STORAGE = 1;
|
||||||
|
Fragment welcome;
|
||||||
|
Fragment warning;
|
||||||
|
Fragment storage;
|
||||||
|
Fragment superuser;
|
||||||
|
Fragment finish;
|
||||||
|
|
||||||
|
private void initFragments() {
|
||||||
|
welcome = AppIntroFragment.newInstance(
|
||||||
|
"Welcome!",
|
||||||
|
"This is the Play Music Exporter. It can export songs from Play Music " +
|
||||||
|
"and save them as MP3 files where you want them to be.",
|
||||||
|
R.drawable.ic_launcher_transparent,
|
||||||
|
Color.parseColor("#ef6c00"));
|
||||||
|
warning = AppIntroFragment.newInstance(
|
||||||
|
"Warning!",
|
||||||
|
"You are responsible for what you do with this app. Depending on where you live " +
|
||||||
|
"it might be illegal to use this app. We discourage piracy of music " +
|
||||||
|
"and other intellectual property. Sharing music you exported with " +
|
||||||
|
"this tool might be a very bad idea, Google could put an invisible " +
|
||||||
|
"watermark on the music, so that people can trace the MP3s back to " +
|
||||||
|
"the owner of the Google account that was used.",
|
||||||
|
R.drawable.ic_warning_white,
|
||||||
|
Color.parseColor("#ef6c00"));
|
||||||
|
storage = AppIntroFragment.newInstance(
|
||||||
|
"We need access to your storage.",
|
||||||
|
"We need to access the external storage, " +
|
||||||
|
"for copying the Play Music database to a folder," +
|
||||||
|
"where we have the right to work with it. " +
|
||||||
|
"We also need access to the external storage," +
|
||||||
|
"to finish up the MP3s, from encrypted without ID3 tags," +
|
||||||
|
"to decrypted with ID3 tags, before we save them to your export path.",
|
||||||
|
R.drawable.ic_folder_white,
|
||||||
|
Color.parseColor("#ef6c00"));
|
||||||
|
superuser = AppIntroFragment.newInstance(
|
||||||
|
"We need root access.",
|
||||||
|
"Some of the files we need to access are in the private folders of Play Music. " +
|
||||||
|
"Android prevents apps from accessing the private folders " +
|
||||||
|
"of other apps, but luckily, you can circumvent this protection " +
|
||||||
|
"with root access. Without root access this app can't do anything.",
|
||||||
|
R.drawable.ic_superuser,
|
||||||
|
Color.parseColor("#ef6c00"));
|
||||||
|
finish = AppIntroFragment.newInstance(
|
||||||
|
"Tutorial finished!",
|
||||||
|
"One note: Should you revoke any of these permission, the tutorial will be " +
|
||||||
|
"shown again on the next launch.",
|
||||||
|
R.drawable.ic_launcher_transparent,
|
||||||
|
Color.parseColor("#ef6c00"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
if (getSupportActionBar() != null) getSupportActionBar().hide();
|
||||||
|
showSkipButton(false);
|
||||||
|
|
||||||
|
initFragments();
|
||||||
|
|
||||||
|
addSlide(welcome);
|
||||||
|
addSlide(warning);
|
||||||
|
addSlide(storage);
|
||||||
|
addSlide(superuser);
|
||||||
|
addSlide(finish);
|
||||||
|
|
||||||
|
pager.setPagingEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSlideChanged(@Nullable Fragment oldFragment, @Nullable Fragment newFragment) {
|
||||||
|
super.onSlideChanged(oldFragment, newFragment);
|
||||||
|
logSlideChanged(oldFragment, newFragment);
|
||||||
|
if (warning.equals(oldFragment) && storage.equals(newFragment)) {
|
||||||
|
promptAcceptWarning();
|
||||||
|
} else if (storage.equals(oldFragment) && superuser.equals(newFragment)) {
|
||||||
|
requestStoragePermission();
|
||||||
|
} else if (superuser.equals(oldFragment) && finish.equals(newFragment)) {
|
||||||
|
SuperUser.askForPermissionInBackground(granted -> {
|
||||||
|
if (!granted) {
|
||||||
|
AlertDialog.Builder builder =
|
||||||
|
new AlertDialog.Builder(this);
|
||||||
|
builder.setTitle(R.string.dialog_superuser_access_denied_title);
|
||||||
|
builder.setMessage(R.string.dialog_superuser_access_denied);
|
||||||
|
builder.setCancelable(false);
|
||||||
|
builder.setPositiveButton(R.string.text_okay, (dialog, which)
|
||||||
|
-> pager.setCurrentItem(pager.getCurrentItem() - 1));
|
||||||
|
builder.show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void requestStoragePermission() {
|
||||||
|
if (ContextCompat.checkSelfPermission(this,
|
||||||
|
Manifest.permission.WRITE_EXTERNAL_STORAGE)
|
||||||
|
!= PackageManager.PERMISSION_GRANTED) {
|
||||||
|
|
||||||
|
ActivityCompat.requestPermissions(this,
|
||||||
|
new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},
|
||||||
|
PERMISSIONS_REQUEST_WRITE_EXTERNAL_STORAGE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
|
||||||
|
switch (requestCode) {
|
||||||
|
case PERMISSIONS_REQUEST_WRITE_EXTERNAL_STORAGE: {
|
||||||
|
// If request is cancelled, the result arrays are empty.
|
||||||
|
if (!(grantResults.length > 0
|
||||||
|
&& grantResults[0] == PackageManager.PERMISSION_GRANTED)) {
|
||||||
|
// Shows a warning and close the app
|
||||||
|
AlertDialog.Builder builder =
|
||||||
|
new AlertDialog.Builder(this);
|
||||||
|
builder.setTitle(R.string.dialog_storage_access_denied_title);
|
||||||
|
builder.setMessage(R.string.dialog_storage_access_denied);
|
||||||
|
builder.setCancelable(false);
|
||||||
|
builder.setPositiveButton(R.string.text_okay, (dialog, which)
|
||||||
|
-> pager.setCurrentItem(pager.getCurrentItem() - 1));
|
||||||
|
builder.show();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void promptAcceptWarning() {
|
||||||
|
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||||
|
builder.setTitle("Understood?");
|
||||||
|
builder.setMessage("Have you read and understood this?");
|
||||||
|
builder.setCancelable(false);
|
||||||
|
builder.setNegativeButton("No", ((dialog, which)
|
||||||
|
-> pager.setCurrentItem(pager.getCurrentItem() - 1)));
|
||||||
|
builder.setPositiveButton("Yes", (((dialog, which) -> dialog.dismiss())));
|
||||||
|
builder.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void logSlideChanged(@Nullable Fragment oldFragment, @Nullable Fragment newFragment) {
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||||
|
// Optional.ofNullable requires API level 24, and I won't do manual null checks.
|
||||||
|
Log.i(TAG, "Fragment switched from {" +
|
||||||
|
Optional.ofNullable(oldFragment).map(Fragment::toString).orElse("") +
|
||||||
|
"} to {" +
|
||||||
|
Optional.ofNullable(newFragment).map(Fragment::toString).orElse("") +
|
||||||
|
"}.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDonePressed(Fragment currentFragment) {
|
||||||
|
PlayMusicExporterPreferences.init(this);
|
||||||
|
PlayMusicExporterPreferences.setSetupDone(true);
|
||||||
|
startActivity(new Intent(this, MusicContainerListActivity.class));
|
||||||
|
}
|
||||||
|
}
|
|
@ -23,7 +23,6 @@
|
||||||
package re.jcg.playmusicexporter.activities;
|
package re.jcg.playmusicexporter.activities;
|
||||||
|
|
||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
|
@ -55,6 +54,7 @@ import de.arcus.playmusiclib.datasources.ArtistDataSource;
|
||||||
import de.arcus.playmusiclib.datasources.PlaylistDataSource;
|
import de.arcus.playmusiclib.datasources.PlaylistDataSource;
|
||||||
import de.arcus.playmusiclib.enums.ID3v2Version;
|
import de.arcus.playmusiclib.enums.ID3v2Version;
|
||||||
import de.arcus.playmusiclib.items.MusicTrackList;
|
import de.arcus.playmusiclib.items.MusicTrackList;
|
||||||
|
import re.jcg.playmusicexporter.settings.PlayMusicExporterPreferences;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An activity representing a list of Tracks. This activity
|
* An activity representing a list of Tracks. This activity
|
||||||
|
@ -104,59 +104,68 @@ public class MusicContainerListActivity extends AppCompatActivity
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_track_list);
|
|
||||||
|
|
||||||
//Adds the crash handler to this class
|
//Adds the crash handler to this class
|
||||||
CrashHandler.addCrashHandler(this);
|
CrashHandler.addCrashHandler(this);
|
||||||
|
|
||||||
Logger.getInstance().logVerbose("Activity", "onCreate(" + this.getLocalClassName() + ")");
|
PlayMusicExporterPreferences.init(this);
|
||||||
|
if (!PlayMusicExporterPreferences.getSetupDone()) {
|
||||||
|
startActivity(new Intent(this, Intro.class));
|
||||||
|
finish();
|
||||||
|
} else {
|
||||||
|
|
||||||
// Setup ActionBar
|
setContentView(R.layout.activity_track_list);
|
||||||
ActionBar actionBar = getSupportActionBar();
|
|
||||||
if (actionBar != null) {
|
|
||||||
actionBar.setTitle(R.string.app_name);
|
Logger.getInstance().logVerbose("Activity", "onCreate(" + this.getLocalClassName() + ")");
|
||||||
|
|
||||||
|
// Setup ActionBar
|
||||||
|
ActionBar actionBar = getSupportActionBar();
|
||||||
|
if (actionBar != null) {
|
||||||
|
actionBar.setTitle(R.string.app_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
mNavigationDrawerFragment = (NavigationDrawerFragment)
|
||||||
|
getSupportFragmentManager().findFragmentById(R.id.navigation_drawer);
|
||||||
|
|
||||||
|
mNavigationDrawerFragment.setOnListViewChanged(this);
|
||||||
|
|
||||||
|
// Set up the drawer.
|
||||||
|
mNavigationDrawerFragment.setUp(
|
||||||
|
R.id.navigation_drawer,
|
||||||
|
(DrawerLayout) findViewById(R.id.drawer_layout));
|
||||||
|
|
||||||
|
if (findViewById(R.id.track_detail_container) != null) {
|
||||||
|
// The detail container view will be present only in the
|
||||||
|
// large-screen layouts (res/values-large and
|
||||||
|
// res/values-sw600dp). If this view is present, then the
|
||||||
|
// activity should be in two-pane mode.
|
||||||
|
mTwoPane = true;
|
||||||
|
|
||||||
|
// In two-pane mode, list items should be given the
|
||||||
|
// 'activated' state when touched.
|
||||||
|
((MusicContainerListFragment) getSupportFragmentManager()
|
||||||
|
.findFragmentById(R.id.fragment_main))
|
||||||
|
.setActivateOnItemClick(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean waitForPermissions = false;
|
||||||
|
|
||||||
|
// Check file system permissions
|
||||||
|
if (ContextCompat.checkSelfPermission(this,
|
||||||
|
Manifest.permission.WRITE_EXTERNAL_STORAGE)
|
||||||
|
!= PackageManager.PERMISSION_GRANTED) {
|
||||||
|
|
||||||
|
ActivityCompat.requestPermissions(this,
|
||||||
|
new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},
|
||||||
|
PERMISSIONS_REQUEST_WRITE_EXTERNAL_STORAGE);
|
||||||
|
waitForPermissions = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!waitForPermissions)
|
||||||
|
loadPlayMusicExporter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
mNavigationDrawerFragment = (NavigationDrawerFragment)
|
|
||||||
getSupportFragmentManager().findFragmentById(R.id.navigation_drawer);
|
|
||||||
|
|
||||||
mNavigationDrawerFragment.setOnListViewChanged(this);
|
|
||||||
|
|
||||||
// Set up the drawer.
|
|
||||||
mNavigationDrawerFragment.setUp(
|
|
||||||
R.id.navigation_drawer,
|
|
||||||
(DrawerLayout) findViewById(R.id.drawer_layout));
|
|
||||||
|
|
||||||
if (findViewById(R.id.track_detail_container) != null) {
|
|
||||||
// The detail container view will be present only in the
|
|
||||||
// large-screen layouts (res/values-large and
|
|
||||||
// res/values-sw600dp). If this view is present, then the
|
|
||||||
// activity should be in two-pane mode.
|
|
||||||
mTwoPane = true;
|
|
||||||
|
|
||||||
// In two-pane mode, list items should be given the
|
|
||||||
// 'activated' state when touched.
|
|
||||||
((MusicContainerListFragment) getSupportFragmentManager()
|
|
||||||
.findFragmentById(R.id.fragment_main))
|
|
||||||
.setActivateOnItemClick(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean waitForPermissions = false;
|
|
||||||
|
|
||||||
// Check file system permissions
|
|
||||||
if (ContextCompat.checkSelfPermission(this,
|
|
||||||
Manifest.permission.WRITE_EXTERNAL_STORAGE)
|
|
||||||
!= PackageManager.PERMISSION_GRANTED) {
|
|
||||||
|
|
||||||
ActivityCompat.requestPermissions(this,
|
|
||||||
new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},
|
|
||||||
PERMISSIONS_REQUEST_WRITE_EXTERNAL_STORAGE);
|
|
||||||
waitForPermissions = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!waitForPermissions)
|
|
||||||
loadPlayMusicExporter();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -205,8 +214,8 @@ public class MusicContainerListActivity extends AppCompatActivity
|
||||||
mPlayMusicManager.setID3EnableArtwork(true);
|
mPlayMusicManager.setID3EnableArtwork(true);
|
||||||
mPlayMusicManager.setID3EnableFallback(true);
|
mPlayMusicManager.setID3EnableFallback(true);
|
||||||
mPlayMusicManager.setID3v2Version(ID3v2Version.ID3v23);
|
mPlayMusicManager.setID3v2Version(ID3v2Version.ID3v23);
|
||||||
mPlayMusicManager.setID3ArtworkFormat(Bitmap.CompressFormat.JPEG);
|
mPlayMusicManager.setID3ArtworkFormat(Bitmap.CompressFormat.PNG);
|
||||||
mPlayMusicManager.setID3ArtworkMaximumSize(512);
|
mPlayMusicManager.setID3ArtworkMaximumSize(PlayMusicExporterPreferences.getAlbumArtSize());
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.getInstance().logError("SetupPlayMusicExporter", e.toString());
|
Logger.getInstance().logError("SetupPlayMusicExporter", e.toString());
|
||||||
|
|
|
@ -34,11 +34,17 @@ public class PlayMusicExporterPreferences {
|
||||||
private static final String GROUPS_EXPORT_STRUCTURE = "preference_groups_export_structure";
|
private static final String GROUPS_EXPORT_STRUCTURE = "preference_groups_export_structure";
|
||||||
private static final String EXPORT_STRUCTURE_DEFAULT = "{album-artist}/{album}/{disc=CD $}/{no=$$.} {title}.mp3";
|
private static final String EXPORT_STRUCTURE_DEFAULT = "{album-artist}/{album}/{disc=CD $}/{no=$$.} {title}.mp3";
|
||||||
|
|
||||||
|
private static final String EXPORT_ALBUM_ART_SIZE = "preference_id3_artwork_size";
|
||||||
|
private static final int EXPORT_ALBUM_ART_SIZE_DEFAULT = 512;
|
||||||
|
|
||||||
private static final String DRAWER_LEARNED = "pref_drawer_learned";
|
private static final String DRAWER_LEARNED = "pref_drawer_learned";
|
||||||
private static final boolean DRAWER_LEARNED_DEFAULT = false;
|
private static final boolean DRAWER_LEARNED_DEFAULT = false;
|
||||||
private static final String DRAWER_SELECTED_TYPE = "pref_drawer_selected_type";
|
private static final String DRAWER_SELECTED_TYPE = "pref_drawer_selected_type";
|
||||||
private static final String DRAWER_SELECTED_TYPE_DEFAULT = "Album";
|
private static final String DRAWER_SELECTED_TYPE_DEFAULT = "Album";
|
||||||
|
|
||||||
|
private static final String SETUP_DONE = "preference_setup_done";
|
||||||
|
private static final boolean SETUP_DONE_DEFAULT = false;
|
||||||
|
|
||||||
|
|
||||||
private PlayMusicExporterPreferences() {
|
private PlayMusicExporterPreferences() {
|
||||||
}
|
}
|
||||||
|
@ -141,4 +147,20 @@ public class PlayMusicExporterPreferences {
|
||||||
public static boolean getAutoExportRequireCharging() {
|
public static boolean getAutoExportRequireCharging() {
|
||||||
return preferences.getBoolean(AUTO_EXPORT_REQUIRE_CHARGING, AUTO_EXPORT_REQUIRE_CONDITION_DEFAULT);
|
return preferences.getBoolean(AUTO_EXPORT_REQUIRE_CHARGING, AUTO_EXPORT_REQUIRE_CONDITION_DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean getSetupDone() {
|
||||||
|
return preferences.getBoolean(SETUP_DONE, SETUP_DONE_DEFAULT);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setSetupDone(boolean done) {
|
||||||
|
preferences.edit().putBoolean(SETUP_DONE, done).apply();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int getAlbumArtSize() {
|
||||||
|
return Integer.parseInt(preferences.getString(EXPORT_ALBUM_ART_SIZE, "" + EXPORT_ALBUM_ART_SIZE_DEFAULT));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setAlbumArtSize(int size) {
|
||||||
|
preferences.edit().putString(EXPORT_ALBUM_ART_SIZE, "" + size).apply();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
BIN
playmusicexporter/src/main/res/drawable/ic_folder_white.png
Normal file
BIN
playmusicexporter/src/main/res/drawable/ic_folder_white.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 366 KiB |
BIN
playmusicexporter/src/main/res/drawable/ic_superuser.png
Normal file
BIN
playmusicexporter/src/main/res/drawable/ic_superuser.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
BIN
playmusicexporter/src/main/res/drawable/ic_warning_white.png
Normal file
BIN
playmusicexporter/src/main/res/drawable/ic_warning_white.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
|
@ -50,7 +50,11 @@
|
||||||
<string name="notification_export_finished_single_summery">%1$s was exported successfully!</string>
|
<string name="notification_export_finished_single_summery">%1$s was exported successfully!</string>
|
||||||
|
|
||||||
<string name="dialog_storage_access_denied_title">Storage access denied</string>
|
<string name="dialog_storage_access_denied_title">Storage access denied</string>
|
||||||
<string name="dialog_storage_access_denied">The PlayMusicExporter always needs to write to the external storage. This is part of the Marshmallow fix.\n\nPlease restart the app and grant the permission.</string>
|
<string name="dialog_storage_access_denied">The PlayMusicExporter does not work without write access to the external storage. You can not use this app without granting it write access.</string>
|
||||||
|
|
||||||
|
<string name="dialog_superuser_access_denied_title">Superuser access denied</string>
|
||||||
|
<string name="dialog_superuser_access_denied">The PlayMusicExporter does not work without superuser access. You can not use this app without granting it superuser access.</string>
|
||||||
|
|
||||||
|
|
||||||
<string name="toast_error_track_not_offline">You can only export offline tracks. Try to download the album offline in Play Music.</string>
|
<string name="toast_error_track_not_offline">You can only export offline tracks. Try to download the album offline in Play Music.</string>
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ android {
|
||||||
buildToolsVersion "25.0.2"
|
buildToolsVersion "25.0.2"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 9
|
minSdkVersion 11
|
||||||
targetSdkVersion 25
|
targetSdkVersion 25
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0"
|
versionName "1.0"
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
<facet type="android" name="Android">
|
<facet type="android" name="Android">
|
||||||
<configuration>
|
<configuration>
|
||||||
<option name="SELECTED_BUILD_VARIANT" value="debug" />
|
<option name="SELECTED_BUILD_VARIANT" value="debug" />
|
||||||
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
|
|
||||||
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
|
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
|
||||||
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
|
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
|
||||||
<afterSyncTasks>
|
<afterSyncTasks>
|
||||||
|
@ -20,7 +19,7 @@
|
||||||
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
|
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
|
||||||
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
|
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
|
||||||
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
|
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
|
||||||
<option name="LIBRARY_PROJECT" value="true" />
|
<option name="PROJECT_TYPE" value="1" />
|
||||||
</configuration>
|
</configuration>
|
||||||
</facet>
|
</facet>
|
||||||
</component>
|
</component>
|
||||||
|
@ -48,7 +47,6 @@
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
|
||||||
|
@ -56,7 +54,6 @@
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/jni" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
|
||||||
|
@ -64,7 +61,6 @@
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
|
||||||
|
@ -72,7 +68,6 @@
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/jni" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
|
||||||
|
@ -80,7 +75,6 @@
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotations" />
|
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotations" />
|
||||||
|
|
Loading…
Reference in a new issue