Skip to content

Commit

Permalink
Move to lineage-20.0 branch
Browse files Browse the repository at this point in the history
  • Loading branch information
dwi336 committed Oct 1, 2022
1 parent 5234627 commit ed7945a
Show file tree
Hide file tree
Showing 666 changed files with 10,953 additions and 24,959 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

Eleven music player (CyanogenMod/LineageOS) - compatible with Android version >14

Copied from https://github.com/LineageOS/android_packages_apps_Eleven/archive/cm-14.1.zip (03.08.2017)
Initially Copied from https://github.com/LineageOS/android_packages_apps_Eleven/archive/cm-14.1.zip (03.08.2017)

Moved to lineage-17.1 branch.
Merged with upstream project on 07.06.2020
Moved to lineage-20.0 branch.
Merged with upstream project on 19.09.2022

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

Expand Down
45 changes: 24 additions & 21 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 29
compileSdkVersion 33
buildToolsVersion '33.0.0'
namespace 'org.lineageos.eleven'

defaultConfig {
applicationId "org.lineageos.eleven"
minSdkVersion 14
targetSdkVersion 29
renderscriptTargetApi 29
targetSdkVersion 33
renderscriptTargetApi 19
renderscriptSupportModeEnabled true
versionCode 3
versionName "3.0"
versionCode 410
versionName "4.1.0"

vectorDrawables.useSupportLibrary = true
vectorDrawables.useSupportLibrary true
multiDexEnabled true
}

signingConfigs {
Expand All @@ -25,23 +28,20 @@ android {
}

compileOptions {
sourceCompatibility "1.8"
targetCompatibility "1.8"
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}

buildTypes {
release {
minifyEnabled false
minifyEnabled true
shrinkResources true
zipAlignEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
signingConfig signingConfigs.release
}
}

dexOptions {
dexInProcess true
preDexLibraries true
}

lintOptions {

// HTML report is enough (can be found inside build/reports/)
Expand All @@ -63,7 +63,7 @@ dependencies {
// AndroidX - https://developer.android.com/jetpack/androidx/releases

// see https://developer.android.com/jetpack/androidx/releases/appcompat
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.appcompat:appcompat:1.5.1'

// see https://developer.android.com/jetpack/androidx/releases/cardview
implementation 'androidx.cardview:cardview:1.0.0'
Expand All @@ -75,24 +75,27 @@ dependencies {
implementation 'androidx.preference:preference:1.1.1'

// see https://developer.android.com/jetpack/androidx/releases/recyclerview
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'

// see https://developer.android.com/jetpack/androidx/releases/core
implementation "androidx.core:core:1.3.0"
implementation "androidx.core:core:1.9.0"

// see https://developer.android.com/jetpack/androidx/releases/media
implementation 'androidx.media:media:1.1.0'
implementation 'androidx.media:media:1.6.0'

// see https://github.com/google/guava/releases
implementation 'com.google.guava:guava:29.0-jre'

// see https://developer.android.com/jetpack/androidx/releases/core#core-animation
implementation "androidx.core:core-animation:1.0.0-alpha01"
implementation "androidx.core:core-animation:1.0.0-beta01"

// see https://developer.android.com/jetpack/androidx/releases/constraintlayout
implementation "androidx.constraintlayout:constraintlayout:1.1.3"
implementation "androidx.constraintlayout:constraintlayout:2.1.4"

// see https://github.com/material-components/material-components-android/releases
implementation "com.google.android.material:material:1.1.0"
implementation "com.google.android.material:material:1.6.1"

// see https://developer.android.com/jetpack/androidx/releases/multidex
implementation 'androidx.multidex:multidex:2.0.1'
}

31 changes: 31 additions & 0 deletions app/proguard-project.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

# we are open source
-dontobfuscate

-dontwarn androidx.renderscript.*
-keepclassmembers class androidx.renderscript.RenderScript {
native *** rsn*(...);
native *** n*(...);
}

37 changes: 25 additions & 12 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +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
Copyright (C) 2019-2021 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 @@ -18,29 +18,35 @@
<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:versionCode="410"
android:versionName="4.1.0"
tools:ignore="GradleOverrides">

<!-- Android Studio will complain about not being able to
resove the symbol, but it compiles with no problem.
Do not remove for as long as there are officially supported
devices that were supported in 14.1 -->
<!-- suppress AndroidElementNotAllowed -->
<!-- Used for caching and creating new playlists -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- Used to check for a network connection -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!-- Used to download images -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- Used to keep the service running when the phone sleeps -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<!-- The main service uses a sticky broadcast -->
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
<!-- Lower or raise the music based on the phone state -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<!-- Used to set the devices's ringtone -->
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SETTINGS"
tools:ignore="ProtectedPermissions" />
<!-- Used to create launcher shortcuts -->
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<!-- Allows Eleven to read from External Storage -->
<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" />
<uses-permission android:name="android.permission.WRITE_MEDIA_STORAGE"
tools:ignore="ProtectedPermissions" />

<!-- Audio Visualizer Permissions -->
<uses-permission android:name="android.permission.RECORD_AUDIO" />
Expand All @@ -56,6 +62,7 @@
android:name="org.lineageos.eleven.ElevenApplication"
android:allowBackup="true"
android:allowTaskReparenting="true"
android:requestLegacyExternalStorage="true"
android:hardwareAccelerated="@bool/config_hardwareAccelerated"
android:appCategory="audio"
android:icon="@mipmap/ic_launcher"
Expand Down Expand Up @@ -98,13 +105,15 @@
<!-- Used to set options -->
<activity
android:name="org.lineageos.eleven.ui.activities.SettingsActivity"
android:exported="false"
android:label="@string/menu_settings"
android:theme="@style/Eleven.Theme.ActionBar.Overlay"/>
<!-- Audio Preview -->
<activity
android:name=".ui.activities.preview.AudioPreviewActivity"
android:launchMode="singleTask"
android:excludeFromRecents="true"
android:exported="true"
android:launchMode="singleTask"
android:taskAffinity=""
android:theme="@style/Theme.AudioPreview">
<intent-filter>
Expand Down Expand Up @@ -182,22 +191,26 @@
android:resource="@xml/app_widget_large_alternate" />
</receiver>
<!-- Media button receiver -->
<receiver android:name="org.lineageos.eleven.MediaButtonIntentReceiver" >
<receiver
android:name="org.lineageos.eleven.MediaButtonIntentReceiver"
android:exported="false">
<intent-filter>
<action android:name="android.intent.action.MEDIA_BUTTON" />
</intent-filter>
</receiver>
<!-- Used to recalculate sorting of songs based on the user's locale -->
<receiver android:name=".locale.LocaleChangeReceiver">
<receiver
android:name=".locale.LocaleChangeReceiver"
android:exported="false">
<intent-filter>
<action android:name="android.intent.action.LOCALE_CHANGED"/>
</intent-filter>
</receiver>
<!-- Music service -->
<service
android:name="org.lineageos.eleven.MusicPlaybackService"
android:exported="false"
android:label="@string/app_name"
android:process=":main" />
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
package org.lineageos.eleven.service;

import org.lineageos.eleven.service.MusicPlaybackTrack;

parcelable MusicPlaybackTrack;
3 changes: 1 addition & 2 deletions app/src/main/java/org/lineageos/eleven/BuildConstants.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019 The LineageOS Project
* Copyright (C) 2019-2021 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 @@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.lineageos.eleven;

public class BuildConstants {
Expand Down
51 changes: 20 additions & 31 deletions app/src/main/java/org/lineageos/eleven/Config.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) 2020-2021 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 @@ -20,15 +25,6 @@
*/
public final class Config {

/* This class is never initiated. */
public Config() {
}

/**
* My personal Last.fm API key, please use your own.
*/
public static final String LASTFM_API_KEY = "0bec3f7ec1f914d7c960c12a916c8fb3";

/**
* Used to distinguish album art from artist images
*/
Expand Down Expand Up @@ -56,36 +52,29 @@ public Config() {
*/
public static final String ALBUM_YEAR = "album_year";

/** number of songs in a album or track list */
/**
* number of songs in a album or track list
*/
public static final String SONG_COUNT = "song_count";

/**
* The MIME type passed to a the profile activity
*/
public static final String MIME_TYPE = "mime_type";

/**
* Play from search intent
*/
public static final String PLAY_FROM_SEARCH = "android.media.action.MEDIA_PLAY_FROM_SEARCH";

/**
* The smart playlist type
*/
public static final String SMART_PLAYLIST_TYPE = "smart_playlist_type";

/**
* Number of search results to show at the top level search
*/
public static final int SEARCH_NUM_RESULTS_TO_GET = 3;

public static enum SmartPlaylistType {
public enum SmartPlaylistType {
LastAdded(-1, R.string.playlist_last_added),
RecentlyPlayed(-2, R.string.playlist_recently_played),
TopTracks(-3, R.string.playlist_top_tracks);

public long mId;
public int mTitleId;
public final long mId;
public final int mTitleId;

SmartPlaylistType(long id, int titleId) {
mId = id;
Expand All @@ -107,7 +96,7 @@ public static SmartPlaylistType getTypeById(long id) {
* This helps identify where an id has come from. Mainly used to determine when a user
* clicks a song where that song came from (artist/album/playlist)
*/
public static enum IdType {
public enum IdType {
NA(0),
Artist(1),
Album(2),
Expand Down
Loading

0 comments on commit ed7945a

Please sign in to comment.