From 82006cb9ac2c1809926033b20767a561785a645b Mon Sep 17 00:00:00 2001 From: Mihai-Cristian Condrea Date: Sun, 9 Jun 2024 22:09:06 +0300 Subject: [PATCH] Small code reformat --- .github/dependabot.yml | 12 ++++++------ CHANGELOG.md | 18 ++++++++++++++++++ CODE_OF_CONDUCT.md | 2 +- README.md | 16 ++++++++++++---- .../plus/ExampleInstrumentedTest.kt | 8 +++----- .../plus/notifications/SleepNotification.kt | 6 +++--- .../plus/services/SleepTileService.kt | 2 +- .../musicsleeptimer/plus/ExampleUnitTest.kt | 5 ++--- 8 files changed, 46 insertions(+), 23 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index bcf259e..2897296 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,8 +1,8 @@ version: 2 updates: -- package-ecosystem: gradle - directory: "/" - schedule: - interval: weekly - time: "11:00" - open-pull-requests-limit: 10 + - package-ecosystem: gradle + directory: "/" + schedule: + interval: weekly + time: "11:00" + open-pull-requests-limit: 10 diff --git a/CHANGELOG.md b/CHANGELOG.md index 3353800..b2b0893 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,30 +1,39 @@ # Version 2.6_r1: + - Made various project structure enhancements for better readability and maintainability. - Made various under-the-hood improvements for a better overall app experience. # Version 2.5_r1: + - Made various under-the-hood improvements for a better overall app experience. # Version 2.4_r1: + - Made various under-the-hood improvements for a better overall app experience. # Version 2.3_r2: + - Made minor under-the-hood improvements for a better overall app experience. # Version 2.3_r1: + - Made various under-the-hood improvements for a better overall app experience. # Version 2.2_r1: + - Made various under-the-hood improvements for a better overall app experience. # Version 2.1_r2: + - Made various under-the-hood improvements for a better overall app experience. # Version 2.1_r1: + - Added support for Swedish, Hungarian, Bulgarian, Polish and Ukrainian languages. - Made various under-the-hood improvements for a better overall app experience. # Version 2.0_r1: + - Added Store Archive compatibility. - Added Romanian language support. - Added Russian language support. @@ -42,32 +51,41 @@ - Under the hood improvements. # Version 1.0_r9: + - Fixed crashes. - Under the hood improvements. # Version 1.0_r8: + - Under the hood improvements. # Version 1.0_r7: + - Under the hood improvements. # Version 1.0_r6: + - Changes to policy. - Under the hood improvements. # Version 1.0_r5: + - Under the hood improvements. # Version 1.0_r4: + - Under the hood improvements. # Version 1.0_r3: + - Added INTERNET permission (needs for Firebase). - Fixed Firebase. # Version 1.0_r2: + - Removed useless parts of launcher icon. - Fixed README and Google Play Store description. # Version 1.0_r1: + - Initial stable version released. \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 8f4e014..907ee09 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban. ### 4. Permanent Ban **Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an +standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. **Consequence**: A permanent ban from any sort of public interaction within diff --git a/README.md b/README.md index 8302a5a..97ec986 100644 --- a/README.md +++ b/README.md @@ -7,17 +7,25 @@ Music Sleep Timer Plus App **Set your music to stop after you fall asleep effortlessly.** -Drift off to tranquility with Music Sleep Timer Plus, your personal companion for a peaceful night's rest. Our app seamlessly blends into your existing audio experience, ensuring that your favorite tunes, podcasts, or other content gently fade away as you slumber. +Drift off to tranquility with Music Sleep Timer Plus, your personal companion for a peaceful night's +rest. Our app seamlessly blends into your existing audio experience, ensuring that your favorite +tunes, podcasts, or other content gently fade away as you slumber. -Say goodbye to battery-draining music playback that disrupts your sleep. Music Sleep Timer Plus puts you in control, allowing you to set a convenient timer to automatically turn off your audio at a specified time. Simply tap the notification tile, select your desired duration, and let the app work its magic. +Say goodbye to battery-draining music playback that disrupts your sleep. Music Sleep Timer Plus puts +you in control, allowing you to set a convenient timer to automatically turn off your audio at a +specified time. Simply tap the notification tile, select your desired duration, and let the app work +its magic. Lightweight and Efficient, Compatible with Your Favorite Apps -Unlike other sleep timer apps that burden your device, Music Sleep Timer Plus is a lightweight and efficient addition to your Android smartphone. It seamlessly integrates with your existing media players, ensuring compatibility with Spotify, YouTube, and any other app you prefer. +Unlike other sleep timer apps that burden your device, Music Sleep Timer Plus is a lightweight and +efficient addition to your Android smartphone. It seamlessly integrates with your existing media +players, ensuring compatibility with Spotify, YouTube, and any other app you prefer. # Features -**Music Sleep Timer Plus** can be extend the timer directly from the notification drawer and the user can set timers by specific time or duration. +**Music Sleep Timer Plus** can be extend the timer directly from the notification drawer and the +user can set timers by specific time or duration. # Screenshots diff --git a/app/src/androidTest/kotlin/com/d4rk/musicsleeptimer/plus/ExampleInstrumentedTest.kt b/app/src/androidTest/kotlin/com/d4rk/musicsleeptimer/plus/ExampleInstrumentedTest.kt index 8554b52..e5fe095 100644 --- a/app/src/androidTest/kotlin/com/d4rk/musicsleeptimer/plus/ExampleInstrumentedTest.kt +++ b/app/src/androidTest/kotlin/com/d4rk/musicsleeptimer/plus/ExampleInstrumentedTest.kt @@ -1,13 +1,11 @@ package com.d4rk.musicsleeptimer.plus -import androidx.test.platform.app.InstrumentationRegistry import androidx.test.ext.junit.runners.AndroidJUnit4 - +import androidx.test.platform.app.InstrumentationRegistry +import org.junit.Assert.assertEquals import org.junit.Test import org.junit.runner.RunWith -import org.junit.Assert.* - /** * Instrumented test, which will execute on an Android device. * @@ -19,6 +17,6 @@ class ExampleInstrumentedTest { fun useAppContext() { // Context of the app under test. val appContext = InstrumentationRegistry.getInstrumentation().targetContext - assertEquals("com.d4rk.musicsleeptimer.plus", appContext.packageName) + assertEquals("com.d4rk.musicsleeptimer.plus" , appContext.packageName) } } \ No newline at end of file diff --git a/app/src/main/kotlin/com/d4rk/musicsleeptimer/plus/notifications/SleepNotification.kt b/app/src/main/kotlin/com/d4rk/musicsleeptimer/plus/notifications/SleepNotification.kt index cb98063..038e72a 100644 --- a/app/src/main/kotlin/com/d4rk/musicsleeptimer/plus/notifications/SleepNotification.kt +++ b/app/src/main/kotlin/com/d4rk/musicsleeptimer/plus/notifications/SleepNotification.kt @@ -3,9 +3,6 @@ package com.d4rk.musicsleeptimer.plus.notifications import android.app.Notification import android.app.Notification.CATEGORY_EVENT import android.app.Notification.VISIBILITY_PUBLIC -import com.d4rk.musicsleeptimer.plus.notifications.SleepNotification.Action.CANCEL -import com.d4rk.musicsleeptimer.plus.notifications.SleepNotification.Action.DECREMENT -import com.d4rk.musicsleeptimer.plus.notifications.SleepNotification.Action.INCREMENT import android.app.NotificationChannel import android.app.NotificationManager import android.app.NotificationManager.IMPORTANCE_LOW @@ -15,6 +12,9 @@ import android.content.Context import android.content.Intent import android.graphics.drawable.Icon import com.d4rk.musicsleeptimer.plus.R +import com.d4rk.musicsleeptimer.plus.notifications.SleepNotification.Action.CANCEL +import com.d4rk.musicsleeptimer.plus.notifications.SleepNotification.Action.DECREMENT +import com.d4rk.musicsleeptimer.plus.notifications.SleepNotification.Action.INCREMENT import com.d4rk.musicsleeptimer.plus.services.SleepAudioService import com.d4rk.musicsleeptimer.plus.services.SleepTileService import java.lang.System.currentTimeMillis diff --git a/app/src/main/kotlin/com/d4rk/musicsleeptimer/plus/services/SleepTileService.kt b/app/src/main/kotlin/com/d4rk/musicsleeptimer/plus/services/SleepTileService.kt index 6315ade..059bbd5 100644 --- a/app/src/main/kotlin/com/d4rk/musicsleeptimer/plus/services/SleepTileService.kt +++ b/app/src/main/kotlin/com/d4rk/musicsleeptimer/plus/services/SleepTileService.kt @@ -10,9 +10,9 @@ import android.service.quicksettings.Tile.STATE_ACTIVE import android.service.quicksettings.Tile.STATE_INACTIVE import android.service.quicksettings.TileService import com.d4rk.musicsleeptimer.plus.R -import com.d4rk.musicsleeptimer.plus.notifications.SleepNotification.notificationManager import com.d4rk.musicsleeptimer.plus.notifications.SleepNotification.find import com.d4rk.musicsleeptimer.plus.notifications.SleepNotification.handle +import com.d4rk.musicsleeptimer.plus.notifications.SleepNotification.notificationManager import com.d4rk.musicsleeptimer.plus.notifications.SleepNotification.toggle import java.text.DateFormat.SHORT import java.text.DateFormat.getTimeInstance diff --git a/app/src/test/kotlin/com/d4rk/musicsleeptimer/plus/ExampleUnitTest.kt b/app/src/test/kotlin/com/d4rk/musicsleeptimer/plus/ExampleUnitTest.kt index 325a32e..045e5be 100644 --- a/app/src/test/kotlin/com/d4rk/musicsleeptimer/plus/ExampleUnitTest.kt +++ b/app/src/test/kotlin/com/d4rk/musicsleeptimer/plus/ExampleUnitTest.kt @@ -1,9 +1,8 @@ package com.d4rk.musicsleeptimer.plus +import org.junit.Assert.assertEquals import org.junit.Test -import org.junit.Assert.* - /** * Example local unit test, which will execute on the development machine (host). * @@ -12,6 +11,6 @@ import org.junit.Assert.* class ExampleUnitTest { @Test fun addition_isCorrect() { - assertEquals(4, 2 + 2) + assertEquals(4 , 2 + 2) } } \ No newline at end of file