Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
jcgruenhage committed Mar 11, 2017
2 parents c33c463 + fb62013 commit afc5d3f
Show file tree
Hide file tree
Showing 54 changed files with 136 additions and 24 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Expand Up @@ -29,7 +29,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0-beta3'
classpath 'com.android.tools.build:gradle:2.3.0'
}
}

Expand Down
Expand Up @@ -24,7 +24,9 @@

import android.app.Activity;
import android.content.Intent;
import android.os.Build;

import de.arcus.framework.BuildConfig;
import de.arcus.framework.activities.CrashActivity;
import de.arcus.framework.logger.Logger;

Expand Down Expand Up @@ -70,10 +72,25 @@ public void uncaughtException(Thread thread, Throwable ex) {

StringBuilder logBuilder = new StringBuilder();

//Device Information
logBuilder.append("---------- Device Information -----------\n");
logBuilder.append("Manufacturer: ").append(Build.MANUFACTURER).append("\n");
logBuilder.append("Model: ").append(Build.MODEL).append("\n");
logBuilder.append("Device API: ").append(Build.VERSION.RELEASE).append("\n");
logBuilder.append("Product: ").append(Build.PRODUCT).append("\n");
logBuilder.append("Build Number: ").append(Build.DISPLAY).append("\n");
logBuilder.append("Build Tags: ").append(Build.TAGS).append("\n");
logBuilder.append("\n");


// Information
logBuilder.append("---------- Information -----------\n");
logBuilder.append("---------- App Information -----------\n");
logBuilder.append("PackageName: ").append(mActivity.getPackageName()).append("\n");
logBuilder.append("Crashed activity: ").append(mActivity.getLocalClassName()).append("\n");
logBuilder.append("Version number: ").append(BuildConfig.VERSION_NAME).append("\n");
logBuilder.append("Version code: ").append(BuildConfig.VERSION_CODE).append("\n");
logBuilder.append("\n");


logBuilder.append("----------- Exception ------------\n");
logBuilder.append(ex.getMessage()).append("\n");
Expand Down
15 changes: 8 additions & 7 deletions playmusicexporter/build.gradle
Expand Up @@ -33,13 +33,14 @@ android {
minSdkVersion 21
targetSdkVersion 25
// TODO Change Version with releases
versionCode 106
versionName '0.9.4'
versionCode 107
versionName '0.9.5'
vectorDrawables.useSupportLibrary = true

jackOptions {
enabled true
}
buildConfigField "java.util.Date", "BUILD_TIME", "new java.util.Date(" + System.currentTimeMillis() + "L)"
}
buildTypes {
release {
Expand All @@ -57,9 +58,9 @@ dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':framework')
compile project(':playmusiclib')
compile 'com.android.support:appcompat-v7:25.1.1'
compile 'com.android.support:support-v4:25.1.1'
compile 'com.android.support:design:25.1.1'
compile 'com.android.support:support-vector-drawable:25.1.1'
compile "com.github.paolorotolo:appintro:4.1.0"
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support:support-v4:25.2.0'
compile 'com.android.support:design:25.2.0'
compile 'com.android.support:support-vector-drawable:25.2.0'
compile 'com.github.paolorotolo:appintro:4.1.0'
}
Expand Up @@ -40,9 +40,12 @@
import android.view.MenuInflater;
import android.view.MenuItem;
import android.widget.EditText;
import android.widget.Toast;

import de.arcus.framework.logger.Logger;
import de.arcus.framework.crashhandler.CrashHandler;
import de.arcus.playmusiclib.exceptions.CouldNotOpenDatabaseException;
import de.arcus.playmusiclib.exceptions.NoSuperUserException;
import re.jcg.playmusicexporter.R;
import re.jcg.playmusicexporter.fragments.MusicTrackListFragment;
import re.jcg.playmusicexporter.fragments.MusicContainerListFragment;
Expand Down Expand Up @@ -325,8 +328,26 @@ public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.music_track_list, menu);

MenuItem itemRefreshLibrary = menu.findItem(R.id.action_refresh);
itemRefreshLibrary.setOnMenuItemClickListener(item ->
{
try
{
mPlayMusicManager.reloadDatabase();
mPlayMusicManager = null;
loadPlayMusicExporter();
Toast.makeText( this, R.string.database_reloaded, Toast.LENGTH_SHORT).show();
}
catch (NoSuperUserException | CouldNotOpenDatabaseException e)
{
Toast.makeText( this, R.string.dialog_superuser_access_denied_title, Toast.LENGTH_SHORT).show();
e.printStackTrace();
}
return true;
});

// Finds the search item and create the search view
MenuItem itemSearch = menu.findItem(R.id.action_search);
MenuItem itemSearch = menu. findItem(R.id.action_search);
mSearchView = (SearchView)MenuItemCompat.getActionView(itemSearch);

if (mSearchView != null) {
Expand Down
Expand Up @@ -23,6 +23,7 @@
import re.jcg.playmusicexporter.services.ExportAllService;
import re.jcg.playmusicexporter.settings.PlayMusicExporterPreferences;

import java.text.SimpleDateFormat;
import java.util.List;

/**
Expand Down Expand Up @@ -305,6 +306,10 @@ public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.pref_about);
setHasOptionsMenu(true);
findPreference("about_version_number").setSummary(BuildConfig.VERSION_NAME);
findPreference("about_build_date")
.setSummary(SimpleDateFormat.getDateInstance().format(BuildConfig.BUILD_TIME));

}

@Override
Expand All @@ -325,13 +330,12 @@ public void onCreate(Bundle savedInstanceState) {
addPreferencesFromResource(R.xml.pref_debug);
setHasOptionsMenu(true);

findPreference("debug_trigger_export_all").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
Log.i(TAG, "Debug Trigger Export All Click registered.");
ExportAllService.startExport(getActivity());
return true;
}
findPreference("debug_trigger_export_all").setOnPreferenceClickListener(preference -> {
ExportAllService.startExport(getActivity());
return true;
});
findPreference("debug_test_crash_handler").setOnPreferenceClickListener(preference -> {
throw new IllegalStateException("Test for the crash handler.");
});
}

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
13 changes: 13 additions & 0 deletions playmusicexporter/src/main/res/drawable/ic_folder_white.xml
@@ -0,0 +1,13 @@
<vector android:height="240dp" android:viewportHeight="1000.0"
android:viewportWidth="1000.0" android:width="240dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#ffffff"
android:pathData="M110.9,67.5C79.5,70.9 48.7,97.3 37,131.2L33.4,141.5l0,302.6 0,302.6l2.6,7.9c11.4,34.5 43.1,61.5 76.4,65 12.9,1.4 764.6,1.4 777.5,0 35.7,-3.8 68.4,-33.6 78,-71.3 1.4,-5.4 1.6,-43.3 1.3,-260.3L968.9,234.1l-3.1,-9c-8.9,-26.4 -34.1,-51.7 -60.4,-60.7L898.2,161.8 700.5,161.5 502.8,161.2 455.6,113.8 408.5,66.4 263.6,66.6C183.9,66.6 115.2,67.1 110.9,67.5" android:strokeColor="#00000000"/>
<path android:fillColor="#ffffff"
android:pathData="M110.9,67.5C79.5,70.9 48.7,97.3 37,131.2L33.4,141.5l0,302.6 0,302.6l2.6,7.9c11.4,34.5 43.1,61.5 76.4,65 12.9,1.4 764.6,1.4 777.5,0 35.7,-3.8 68.4,-33.6 78,-71.3 1.4,-5.4 1.6,-43.3 1.3,-260.3L968.9,234.1l-3.1,-9c-8.9,-26.4 -34.1,-51.7 -60.4,-60.7L898.2,161.8 700.5,161.5 502.8,161.2 455.6,113.8 408.5,66.4 263.6,66.6C183.9,66.6 115.2,67.1 110.9,67.5" android:strokeColor="#00000000"/>
<path android:fillColor="#ffffff"
android:pathData="M110.9,67.5C79.5,70.9 48.7,97.3 37,131.2L33.4,141.5l0,302.6 0,302.6l2.6,7.9c11.4,34.5 43.1,61.5 76.4,65 12.9,1.4 764.6,1.4 777.5,0 35.7,-3.8 68.4,-33.6 78,-71.3 1.4,-5.4 1.6,-43.3 1.3,-260.3L968.9,234.1l-3.1,-9c-8.9,-26.4 -34.1,-51.7 -60.4,-60.7L898.2,161.8 700.5,161.5 502.8,161.2 455.6,113.8 408.5,66.4 263.6,66.6C183.9,66.6 115.2,67.1 110.9,67.5" android:strokeColor="#00000000"/>
<path android:fillColor="#ffffff"
android:pathData="M110.9,67.5C79.5,70.9 48.7,97.3 37,131.2L33.4,141.5l0,302.6 0,302.6l2.6,7.9c11.4,34.5 43.1,61.5 76.4,65 12.9,1.4 764.6,1.4 777.5,0 35.7,-3.8 68.4,-33.6 78,-71.3 1.4,-5.4 1.6,-43.3 1.3,-260.3L968.9,234.1l-3.1,-9c-8.9,-26.4 -34.1,-51.7 -60.4,-60.7L898.2,161.8 700.5,161.5 502.8,161.2 455.6,113.8 408.5,66.4 263.6,66.6C183.9,66.6 115.2,67.1 110.9,67.5" android:strokeColor="#00000000"/>
<path android:fillColor="#ffffff"
android:pathData="M110.9,67.5C79.5,70.9 48.7,97.3 37,131.2L33.4,141.5l0,302.6 0,302.6l2.6,7.9c11.4,34.5 43.1,61.5 76.4,65 12.9,1.4 764.6,1.4 777.5,0 35.7,-3.8 68.4,-33.6 78,-71.3 1.4,-5.4 1.6,-43.3 1.3,-260.3L968.9,234.1l-3.1,-9c-8.9,-26.4 -34.1,-51.7 -60.4,-60.7L898.2,161.8 700.5,161.5 502.8,161.2 455.6,113.8 408.5,66.4 263.6,66.6C183.9,66.6 115.2,67.1 110.9,67.5" android:strokeColor="#00000000"/>
</vector>
Binary file not shown.
@@ -0,0 +1,5 @@
<vector android:height="240dp" android:viewportHeight="2540.0"
android:viewportWidth="2440.0" android:width="240dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#ffffff"
android:pathData="M422,2416c-11,-15 -26,-64 -37,-128 -10,-57 -20,-109 -22,-115 -4,-9 -27,-13 -68,-13 -38,0 -66,-5 -72,-12 -6,-7 -40,-173 -77,-368l-68,-355 5,-160c3,-124 9,-179 27,-245 109,-407 426,-724 835,-831 79,-21 112,-24 275,-24 163,0 196,3 275,24 409,107 726,424 835,831 18,66 24,121 27,245l5,160 -68,355c-37,195 -71,361 -77,368 -6,7 -34,12 -72,12 -41,0 -64,4 -68,13 -2,6 -12,58 -22,115 -28,159 -16,152 -257,152 -200,0 -201,0 -235,-26 -70,-54 -75,-91 -34,-299 10,-55 29,-152 41,-215 72,-392 79,-414 140,-445 52,-27 102,-18 268,46 86,34 165,68 174,77 15,12 18,12 22,1 8,-26 25,-134 32,-201l6,-68 -90,0c-83,0 -93,-2 -121,-26 -17,-14 -31,-35 -31,-45 0,-49 -35,-180 -65,-245 -78,-171 -188,-285 -352,-368 -29,-14 -55,-26 -58,-26 -3,0 -5,92 -5,205l0,205 95,0c70,0 95,3 95,13 0,7 -103,115 -229,241l-229,229 -95,-89c-128,-120 -367,-369 -367,-383 0,-7 32,-11 90,-11l90,0 0,-205 0,-205 -52,26c-166,84 -274,197 -353,367 -30,66 -65,197 -65,246 0,10 -14,31 -31,45 -28,24 -38,26 -121,26l-90,0 6,68c7,67 24,175 32,201 4,11 7,11 22,-1 9,-9 88,-43 174,-77 166,-64 216,-73 268,-46 61,31 68,53 140,445 12,63 31,160 41,215 41,208 36,245 -34,299 -34,26 -35,26 -235,26 -200,0 -201,0 -220,-24z" android:strokeColor="#00000000"/>
</vector>
25 changes: 25 additions & 0 deletions playmusicexporter/src/main/res/drawable/ic_menu_refresh.xml
@@ -0,0 +1,25 @@
<!--
Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:pathData="M17.6,6.4C16.2,4.9 14.2,4 12,4c-4.4,0 -8,3.6 -8,8s3.6,8 8,8c3.7,0 6.8,-2.6 7.7,-6l-2.1,0c-0.8,2.3 -3,4 -5.6,4c-3.3,0 -6,-2.7 -6,-6s2.7,-6 6,-6c1.7,0 3.1,0.7 4.2,1.8L13,11l7,0L20,4L17.6,6.4z"
android:fillColor="@color/white"/>
</vector>
Binary file not shown.
6 changes: 6 additions & 0 deletions playmusicexporter/src/main/res/drawable/ic_superuser.xml
@@ -0,0 +1,6 @@
<vector android:height="240dp" android:viewportHeight="978.0"
android:viewportWidth="956.0" android:width="240dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillAlpha="1" android:fillColor="#FFFFFF"
android:pathData="M925.9,377.9L697,377.9L633.8,591.6L845.5,591.6l0,76.7L609.7,668.3L538.3,907.6L449.6,907.6L521.1,668.3L335.5,668.3L264.1,907.6L175.4,907.6L246.9,668.3L42.1,668.3l0,-76.7L270.9,591.6L334.2,377.9L122.5,377.9l0,-76.7L358.2,301.1L430.4,61.2l88.7,0L446.9,301.1l185.6,0L704.6,61.2l88.7,0L721.1,301.1L925.9,301.1ZM610.4,376.7L422.1,376.7l-64.6,216l188.3,0z"
android:strokeColor="#00000000" android:strokeWidth="32.00193405"/>
</vector>
Binary file not shown.
4 changes: 4 additions & 0 deletions playmusicexporter/src/main/res/drawable/ic_warning_white.xml
@@ -0,0 +1,4 @@
<vector android:height="240dp" android:viewportHeight="512.0"
android:viewportWidth="512.0" android:width="240dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FFFFFF" android:pathData="m507.6,431.9l-224,-384c-5.7,-9.8 -16.3,-15.9 -27.6,-15.9 -11.4,0 -21.9,6 -27.6,15.9l-224,384c-5.8,9.9 -5.8,22.1 -0.1,32.1 5.7,9.9 16.3,16.1 27.8,16.1h448c11.5,0 22,-6.1 27.8,-16.1 5.7,-9.9 5.7,-22.2 -0.1,-32.1zM256,416c-17.7,0 -32,-14.3 -32,-32 0,-17.7 14.3,-32 32,-32 17.7,0 32,14.3 32,32 0,17.7 -14.3,32 -32,32zM288,288c0,17.7 -14.3,32 -32,32s-32,-14.3 -32,-32v-96c0,-17.7 14.3,-32 32,-32s32,14.3 32,32v96z"/>
</vector>
6 changes: 6 additions & 0 deletions playmusicexporter/src/main/res/menu/music_track_list.xml
Expand Up @@ -29,4 +29,10 @@
app:showAsAction="always"
app:actionViewClass="android.support.v7.widget.SearchView"
/>


<item android:id="@+id/action_refresh"
android:title="@string/action_refesh"
android:icon="@drawable/ic_menu_refresh"
app:showAsAction="always" />
</menu>
7 changes: 5 additions & 2 deletions playmusicexporter/src/main/res/values-de/strings.xml
Expand Up @@ -104,6 +104,9 @@
<string name="settings_auto_export_different_structure_dialog_title">Verzeichnisbaum</string>
<string name="settings_export_overwrite_existing">Bestehende Dateien überschreiben</string>
<string name="file_handling_category">Dateiverarbeitung</string>
<string name="overwrite_summary">Überschreiben Sie die exportierte Datei immer, auch wenn sie bereits existiert.</string>
<string name="overwrite_title">Bestehende Dateien überschreiben.</string>
<string name="overwrite_summary">Überschreiben Sie die exportierte Datei immer, auch wenn sie bereits existiert</string>
<string name="overwrite_title">Bestehende Dateien überschreiben</string>
<string name="action_refesh">Datenbank neu laden</string>
<string name="database_reloaded">Datenbank neu geladen</string>
<string name="debug_test_crash_handler">Teste Fehlerbehandlung</string>
</resources>
2 changes: 2 additions & 0 deletions playmusicexporter/src/main/res/values/colors.xml
Expand Up @@ -44,4 +44,6 @@
<color name="button_navigation_drawer_active">#11000000</color>
<color name="button_navigation_drawer_text">#88000000</color>
<color name="button_navigation_drawer_text_active">#ef6c00</color>
<color name="white">#ffffffff</color>
<color name="black">#ff000000</color>
</resources>
5 changes: 4 additions & 1 deletion playmusicexporter/src/main/res/values/strings.xml
Expand Up @@ -144,6 +144,9 @@

<string name="debug_trigger_export_all_title">Trigger ExportAllService now</string>
<string name="file_handling_category">File Handling</string>
<string name="overwrite_summary">Always overwrite the exported file, even if it already exists.</string>
<string name="overwrite_summary">Always overwrite the exported file, even if it already exists</string>
<string name="overwrite_title">Overwrite Existing Files</string>
<string name="action_refesh">Refresh</string>
<string name="database_reloaded">Music Database Reloaded</string>
<string name="debug_test_crash_handler">Test Crash Handler</string>
</resources>
4 changes: 2 additions & 2 deletions playmusicexporter/src/main/res/xml/pref_about.xml
Expand Up @@ -50,11 +50,11 @@
<!-- TODO change Version number and build date with releases -->
<!-- Version number-->
<Preference
android:summary="0.9.4"
android:key="about_version_number"
android:title="@string/settings_version_number" />
<!-- Build date-->
<Preference
android:summary="01.02.2017"
android:key="about_build_date"
android:title="@string/settings_build_date" />
</PreferenceCategory>

Expand Down
2 changes: 2 additions & 0 deletions playmusicexporter/src/main/res/xml/pref_debug.xml
Expand Up @@ -2,5 +2,7 @@
<PreferenceCategory android:title="@string/settings_category_debug">
<Preference android:title="@string/debug_trigger_export_all_title"
android:key="debug_trigger_export_all"/>
<Preference android:title="@string/debug_test_crash_handler"
android:key="debug_test_crash_handler"/>
</PreferenceCategory>
</PreferenceScreen>
2 changes: 1 addition & 1 deletion playmusiclib/build.gradle
Expand Up @@ -41,6 +41,6 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':framework')
compile 'com.mpatric:mp3agic:0.9.0'
}
Binary file removed playmusiclib/libs/mp3agic-0.8.4.jar
Binary file not shown.
Expand Up @@ -373,7 +373,7 @@ private void loadDatabase() throws NoSuperUserException, CouldNotOpenDatabaseExc
* @throws NoSuperUserException No super user permissions
* @throws CouldNotOpenDatabaseException Could not open the database
*/
public void realoadDatabase() throws NoSuperUserException, CouldNotOpenDatabaseException {
public void reloadDatabase() throws NoSuperUserException, CouldNotOpenDatabaseException {
// Reload database
loadDatabase();
}
Expand Down

0 comments on commit afc5d3f

Please sign in to comment.