Skip to content

Commit

Permalink
Merged with upstream project
Browse files Browse the repository at this point in the history
  • Loading branch information
dwi336 committed Apr 7, 2019
1 parent a8c7710 commit 90cd359
Show file tree
Hide file tree
Showing 213 changed files with 15,273 additions and 16,957 deletions.
2 changes: 1 addition & 1 deletion .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
<classpathentry exported="true" kind="con" path="org.eclipse.andmore.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="org.eclipse.andmore.DEPENDENCIES"/>
<classpathentry kind="lib" path="/home/didi/Android/Sdk/build-tools/28.0.3/renderscript/lib/renderscript-v8.jar"/>
<classpathentry kind="lib" path="libs/guava-24.1-jre.jar"/>
<classpathentry kind="lib" path="libs/guava-24.1-jre.jar"/>
<classpathentry kind="output" path="bin/default"/>
</classpath>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Eleven music player (CyanogenMod/LineageOS) - compatible with Android version >1
Copied from https://github.com/LineageOS/android_packages_apps_Eleven/archive/cm-14.1.zip (03.08.2017)

Moved to lineage-15.1 branch.
Merged with upstream project on 31.12.2018
Merged with upstream project on 07.04.2019

Made compatibility changes for android version >14 using as much material design as possible

Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ dependencies {
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.preference:preference:1.0.0'
implementation 'androidx.gridlayout:gridlayout:1.0.0'
implementation 'androidx.media:media:1.0.0'
implementation 'androidx.media:media:1.0.1'
implementation 'com.google.guava:guava:24.1-jre'
}

12 changes: 8 additions & 4 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012 Andrew Neal
Copyright (C) 2014 The CyanogenMod Project
Copyright (C) 2019 The LineageOS Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -15,9 +16,11 @@
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.lineageos.eleven"
android:versionCode="3"
android:versionName="3.0" >
android:versionName="3.0"
tools:ignore="GradleOverrides">

<uses-sdk
android:minSdkVersion="14"
Expand Down Expand Up @@ -45,13 +48,14 @@
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<!-- Allows Eleven to modify media files on external storage -->
<uses-permission android:name="android.permission.WRITE_MEDIA_STORAGE" />
<!-- For Android Pie -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

<!-- Audio Visualizer Permissions -->
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />

<!-- Allows Eleven to start services in foreground -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

<!-- Accelerometer feature for shake to play -->
<uses-feature android:name="android.hardware.sensor.accelerometer" />

Expand Down Expand Up @@ -86,7 +90,7 @@
<category android:name="android.intent.category.APP_MUSIC" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<intent-filter tools:ignore="AppLinkUrlError">
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
Expand Down
21 changes: 21 additions & 0 deletions app/src/main/java/org/lineageos/eleven/BuildConstants.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Copyright (C) 2019 The LineageOS 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.
*/

package org.lineageos.eleven;

public class BuildConstants {
public static final String PACKAGE_NAME = BuildConfig.APPLICATION_ID;
}
67 changes: 27 additions & 40 deletions app/src/main/java/org/lineageos/eleven/ElevenApplication.java
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
/*
* Copyright (C) 2012 Andrew Neal
* Copyright (C) 2014 The CyanogenMod 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.
* Copyright (C) 2019 The LineageOS 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.
*/

package org.lineageos.eleven;
Expand All @@ -18,50 +23,32 @@

import org.lineageos.eleven.cache.ImageCache;

import java.util.logging.Level;
import java.util.logging.Logger;

/**
* Used to turn off logging for jaudiotagger and free up memory when
* {@code #onLowMemory()} is called on pre-ICS devices. On post-ICS memory is
* released within {@link ImageCache}.
*
* @author Andrew Neal ([email protected])
*/
public class ElevenApplication extends Application {
private static final boolean DEBUG = false;

/**
* {@inheritDoc}
*/
@Override
public void onCreate() {
super.onCreate();
// Enable strict mode logging
enableStrictMode();
// Turn off logging for jaudiotagger.
Logger.getLogger("org.jaudiotagger").setLevel(Level.OFF);

if (BuildConfig.DEBUG) {
enableStrictMode();
}
}

/**
* {@inheritDoc}
*/
@Override
public void onLowMemory() {
ImageCache.getInstance(this).evictAll();
super.onLowMemory();
}

private void enableStrictMode() {
if (DEBUG) {
final StrictMode.ThreadPolicy.Builder threadPolicyBuilder = new StrictMode.ThreadPolicy.Builder()
.detectAll().penaltyLog();
final StrictMode.VmPolicy.Builder vmPolicyBuilder = new StrictMode.VmPolicy.Builder()
.detectAll().penaltyLog();

threadPolicyBuilder.penaltyFlashScreen();
StrictMode.setThreadPolicy(threadPolicyBuilder.build());
StrictMode.setVmPolicy(vmPolicyBuilder.build());
}
final StrictMode.ThreadPolicy.Builder threadPolicyBuilder = new StrictMode.ThreadPolicy.Builder()
.detectAll()
.penaltyLog()
.penaltyFlashScreen();
final StrictMode.VmPolicy.Builder vmPolicyBuilder = new StrictMode.VmPolicy.Builder()
.detectAll()
.penaltyLog();

StrictMode.setThreadPolicy(threadPolicyBuilder.build());
StrictMode.setVmPolicy(vmPolicyBuilder.build());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

public class MediaButtonIntentReceiver extends WakefulBroadcastReceiver {
private static final boolean DEBUG = false;
private static final String TAG = "MediaButtonIntentRecei";
private static final String TAG = "MediaButtonIntentReceiv";

/**
* {@inheritDoc}
Expand Down
Loading

0 comments on commit 90cd359

Please sign in to comment.