Skip to content

Commit

Permalink
Merge branch 'dev' into feature/cover_gestures
Browse files Browse the repository at this point in the history
  • Loading branch information
OxygenCobalt authored Dec 17, 2023
2 parents 56a4102 + cd42c77 commit b0dd13b
Show file tree
Hide file tree
Showing 305 changed files with 10,833 additions and 5,372 deletions.
6 changes: 3 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ If you have knowledge of Android/Kotlin, feel free to to contribute to the proje
- If you want to help out with an existing bug report, comment on the issue that you want to fix saying that you are going to try your hand at it.
- If you want to add something, its recommended to open up an issue for what you want to change before you start working on it. That way I can determine if the addition will be merged in the first place, and generally gives a heads-up overall.
- Do not bring non-free software into the project, such as Binary Blobs.
- Stick to [F-Droid Including Guidelines](https://f-droid.org/wiki/page/Inclusion_Policy)
- Make sure you stick to Auxio's styling with [ktlint](https://github.com/pinterest/ktlint). `ktlintformat` should run on every build.
- Stick to [F-Droid Inclusion Guidelines](https://f-droid.org/wiki/page/Inclusion_Policy)
- Make sure you stick to Auxio's styling, which should be auto-formatted on every build.
- Please ***FULLY TEST*** your changes before creating a PR. Untested code will not be merged.
- Java code will **NOT** be accepted. Kotlin only.
- Only **Kotlin** will be accepted, except for the case that a UI component must be vendored in the project.
- Keep your code up the date with the upstream and continue to maintain it after you create the PR. This makes it less of a hassle to merge.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug-crash-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ body:
attributes:
label: What android version do you use?
options:
- Android 14
- Android 13
- Android 12L
- Android 12
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
# - name: Test app with Gradle
# run: ./gradlew app:testDebug
- name: Test app with Gradle
run: ./gradlew app:testDebug
- name: Build debug APK with Gradle
run: ./gradlew app:packageDebug
- name: Upload debug APK artifact
Expand Down
54 changes: 54 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,59 @@
# Changelog

## dev

#### What's New
- Added ability to rewind/skip tracks by swiping back/forward
- Added support for demo release type

#### What's Changed
- Albums linked to an artist only as a collaborator are no longer included
in an artist's album count

#### What's Fixed
- Fixed certain FLAC files failing to play on some devices


## 3.2.1

#### What's Improved
- Added support for native M4A multi-value tags based on duplicate atoms

#### What's Fixed
- Fixed app restart being required when changing intelligent sorting
or music separator settings
- Fixed widget/notification actions not working on Android 14
- Fixed app crash when using hebrew language
- Fixed app crash when adding to a playlist while in the playlist detail view
- Fixed music loading failing in some cases on Android 14

## 3.2.0

#### What's New
- Item and sort menus have been refreshed with a cleaner look
- Added ability to sort playlists
- Added option to play song by itself in library/item details
- Added error details when music loading fails

#### What's Improved
- Made "Add to Playlist" action more prominent in selection toolbar
- Fixed notification album covers not updating after changing the cover
aspect ratio setting

#### What's Fixed
- Playlist detail view now respects playback settings


#### Dev/Meta
- Revamped navigation backend

## 3.1.4

#### What's Fixed
- Fixed issue where one could not navigate to settings after navigating elsewhere
- Fixed the queue list being non-scrollable in certain cases
- Fixed negative ReplayGain adjustments not being applied

## 3.1.3

#### What's New
Expand Down
21 changes: 9 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<h1 align="center"><b>Auxio</b></h1>
<h4 align="center">A simple, rational music player for android.</h4>
<p align="center">
<a href="https://github.com/oxygencobalt/Auxio/releases/tag/v3.1.3">
<img alt="Latest Version" src="https://img.shields.io/static/v1?label=tag&message=v3.1.3&color=64B5F6&style=flat">
<a href="https://github.com/oxygencobalt/Auxio/releases/tag/v3.2.0">
<img alt="Latest Version" src="https://img.shields.io/static/v1?label=tag&message=v3.2.0&color=64B5F6&style=flat">
</a>
<a href="https://github.com/oxygencobalt/Auxio/releases/">
<img alt="Releases" src="https://img.shields.io/github/downloads/OxygenCobalt/Auxio/total.svg?color=4B95DE&style=flat">
Expand All @@ -21,9 +21,7 @@

## About

Auxio is a local music player with a fast, reliable UI/UX without the many useless features present in other music players. Built off of [ExoPlayer](https://exoplayer.dev/), Auxio has superior library support and listening quality compared to other apps that use outdated android functionality. In short, **It plays music.**

I primarily built Auxio for myself, but you can use it too, I guess.
Auxio is a local music player with a fast, reliable UI/UX without the many useless features present in other music players. Built off of modern media playback libraries, Auxio has superior library support and listening quality compared to other apps that use outdated android functionality. In short, **It plays music.**

**The default branch is the development version of the repository. For a stable version, see the master branch.**

Expand All @@ -42,7 +40,7 @@ I primarily built Auxio for myself, but you can use it too, I guess.

## Features

- [ExoPlayer](https://exoplayer.dev/)-based playback
- Playback based on [Media3 ExoPlayer](https://developer.android.com/guide/topics/media/exoplayer)
- Snappy UI derived from the latest Material Design guidelines
- Opinionated UX that prioritizes ease of use over edge cases
- Customizable behavior
Expand All @@ -60,21 +58,20 @@ precise/original dates, sort tags, and more
- Headset autoplay
- Stylish widgets that automatically adapt to their size
- Completely private and offline
- No rounded album covers (Unless you want them. Then you can.)
- No rounded album covers (by default)

## Permissions

- Storage (`READ_MEDIA_AUDIO`, `READ_EXTERNAL_STORAGE`) to read and play your media files
- Services (`FOREGROUND_SERVICE`, `WAKE_LOCK`) to keep the music playing even if the app itself is in background
- Storage (`READ_MEDIA_AUDIO`, `READ_EXTERNAL_STORAGE`) to read and play your music files
- Services (`FOREGROUND_SERVICE`, `WAKE_LOCK`) to keep the music playing in the background

## Building

Auxio relies on a custom version of ExoPlayer that enables some extra features. This adds some caveats to
the build process:
Auxio relies on a custom version of Media3 that enables some extra features. This adds some caveats to the build process:
1. `cmake` and `ninja-build` must be installed before building the project.
2. The project uses submodules, so when cloning initially, use `git clone --recurse-submodules` to properly
download the external code.
3. You are **unable** to build this project on windows, as the custom ExoPlayer build runs shell scripts that
3. You are **unable** to build this project on windows, as the custom Media3 build runs shell scripts that
will only work on unix-based systems.

## Contributing
Expand Down
39 changes: 24 additions & 15 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ plugins {
id "kotlin-parcelize"
id "dagger.hilt.android.plugin"
id "kotlin-kapt"
id 'org.jetbrains.kotlin.android'
id "com.google.devtools.ksp"
id "org.jetbrains.kotlin.android"
}

android {
Expand All @@ -15,13 +16,13 @@ android {
// it here so that binary stripping will work.
// TODO: Eventually you might just want to start vendoring the FFMpeg extension so the
// NDK use is unified
ndkVersion = "23.2.8568313"
ndkVersion = "25.2.9519653"
namespace "org.oxycblt.auxio"

defaultConfig {
applicationId namespace
versionName "3.1.3"
versionCode 33
versionName "3.2.1"
versionCode 36

minSdk 24
targetSdk 34
Expand All @@ -30,6 +31,7 @@ android {
}

compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
Expand Down Expand Up @@ -77,17 +79,17 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

def coroutines_version = '1.7.1'
def coroutines_version = '1.7.2'
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-guava:$coroutines_version"

// --- SUPPORT ---

// General
implementation "androidx.core:core-ktx:1.10.1"
implementation "androidx.core:core-ktx:1.12.0"
implementation "androidx.appcompat:appcompat:1.6.1"
implementation "androidx.activity:activity-ktx:1.7.2"
implementation "androidx.fragment:fragment-ktx:1.6.0"
implementation "androidx.activity:activity-ktx:1.8.2"
implementation "androidx.fragment:fragment-ktx:1.6.2"

// Components
// Deliberately kept on 1.2.1 to prevent a bug where the queue sheet will not collapse on
Expand All @@ -99,7 +101,7 @@ dependencies {
implementation "androidx.viewpager2:viewpager2:1.0.0"

// Lifecycle
def lifecycle_version = "2.6.1"
def lifecycle_version = "2.6.2"
implementation "androidx.lifecycle:lifecycle-common:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
Expand All @@ -110,40 +112,47 @@ dependencies {
implementation "androidx.navigation:navigation-fragment-ktx:$navigation_version"

// Media
implementation "androidx.media:media:1.6.0"
implementation "androidx.media:media:1.7.0"

// Preferences
implementation "androidx.preference:preference-ktx:1.2.0"
implementation "androidx.preference:preference-ktx:1.2.1"

// Database
def room_version = '2.6.0-alpha02'
def room_version = '2.6.1'
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"
ksp "androidx.room:room-compiler:$room_version"
implementation "androidx.room:room-ktx:$room_version"

// --- THIRD PARTY ---

// Exoplayer (Vendored)
implementation project(":media-lib-exoplayer")
implementation project(":media-lib-decoder-ffmpeg")
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:2.0.4"

// Image loading
implementation 'io.coil-kt:coil-base:2.4.0'

// Material
// TODO: Exactly figure out the conditions that the 1.7.0 ripple bug occurred so you can just
// PR a fix.
implementation "com.google.android.material:material:1.10.0-alpha04"
implementation "com.google.android.material:material:1.10.0"

// Dependency Injection
implementation "com.google.dagger:dagger:$hilt_version"
kapt "com.google.dagger:dagger-compiler:$hilt_version"
implementation "com.google.dagger:hilt-android:$hilt_version"
kapt "com.google.dagger:hilt-android-compiler:$hilt_version"

// Logging
implementation 'com.jakewharton.timber:timber:5.0.1'

// Testing
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.11'
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.12'
testImplementation "junit:junit:4.13.2"
testImplementation "io.mockk:mockk:1.13.7"
testImplementation "org.robolectric:robolectric:4.9"
testImplementation 'androidx.test:core-ktx:1.5.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}
Expand Down
40 changes: 0 additions & 40 deletions app/src/androidTest/java/org/oxycblt/auxio/StubTest.kt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -1671,9 +1671,8 @@ MaterialBottomContainerBackHelper getBackHelper() {
@Nullable
@VisibleForTesting
View findScrollingChild(View view) {
if (view.getVisibility() != View.VISIBLE) {
return null;
}
// MODIFICATION: Remove visibility check that broke nested scrolling in the queue sheet
// due to it being set to invisible when completely hidden
if (ViewCompat.isNestedScrollingEnabled(view)) {
return view;
}
Expand Down Expand Up @@ -1738,16 +1737,10 @@ private void setWindowInsetsListener(@NonNull View child) {
final boolean shouldHandleGestureInsets =
VERSION.SDK_INT >= VERSION_CODES.Q && !isGestureInsetBottomIgnored() && !peekHeightAuto;

// If were not handling insets at all, don't apply the listener.
if (!paddingBottomSystemWindowInsets
&& !paddingLeftSystemWindowInsets
&& !paddingRightSystemWindowInsets
&& !marginLeftSystemWindowInsets
&& !marginRightSystemWindowInsets
&& !marginTopSystemWindowInsets
&& !shouldHandleGestureInsets) {
return;
}
// MODIFICATION: Fix awful assumption that clients handling edge-to-edge by themselves
// don't need peek height adjustments (Despite the fact that they still likely padding
// the view, just without clipping anything)

ViewUtils.doOnApplyWindowInsets(
child,
new ViewUtils.OnApplyWindowInsetsListener() {
Expand All @@ -1759,7 +1752,16 @@ public WindowInsetsCompat onApplyWindowInsets(
Insets mandatoryGestureInsets =
insets.getInsets(WindowInsetsCompat.Type.mandatorySystemGestures());

insetTop = systemBarInsets.top;
// MODIFICATION: Fix second order change of edge-to-edge fix where dialogs will not
// use the nice-looking inset animation and instead blindly shift themselves downwards.
// insetTop = systemBarInsets.top;

// MODIFICATION: Fix awful assumption that clients handling edge-to-edge by themselves
// don't need peek height adjustments (Despite the fact that they still likely padding
// the view, just without clipping anything)
// Intentionally uses getSystemWindowInsetBottom to apply padding properly when
// adjustResize is used as the windowSoftInputMode.
insetBottom = insets.getSystemWindowInsetBottom();

boolean isRtl = ViewUtils.isLayoutRtl(view);

Expand All @@ -1768,9 +1770,6 @@ public WindowInsetsCompat onApplyWindowInsets(
int rightPadding = view.getPaddingRight();

if (paddingBottomSystemWindowInsets) {
// Intentionally uses getSystemWindowInsetBottom to apply padding properly when
// adjustResize is used as the windowSoftInputMode.
insetBottom = insets.getSystemWindowInsetBottom();
bottomPadding = initialPadding.bottom + insetBottom;
}

Expand Down Expand Up @@ -1811,11 +1810,10 @@ public WindowInsetsCompat onApplyWindowInsets(
gestureInsetBottom = mandatoryGestureInsets.bottom;
}

// Don't update the peek height to be above the navigation bar or gestures if these
// flags are off. It means the client is already handling it.
if (paddingBottomSystemWindowInsets || shouldHandleGestureInsets) {
updatePeekHeight(/* animate= */ false);
}
// MODIFICATION: Fix awful assumption that clients handling edge-to-edge by themselves
// don't need peek height adjustments (Despite the fact that they still likely padding
// the view, just without clipping anything)
updatePeekHeight(/* animate= */ false);
return insets;
}
});
Expand Down
Loading

0 comments on commit b0dd13b

Please sign in to comment.