drawable: fix resources
Turns out the icon commit from earlier was really slapdash and resulted in the image drawables being lost. Also fix some misc widget issues.
BIN
app/src/main/ic_launcher-playstore.png
Normal file
After Width: | Height: | Size: 22 KiB |
|
@ -32,7 +32,6 @@ import org.oxycblt.auxio.coil.loadBitmap
|
|||
import org.oxycblt.auxio.music.Parent
|
||||
import org.oxycblt.auxio.music.Song
|
||||
import org.oxycblt.auxio.playback.state.LoopMode
|
||||
import org.oxycblt.auxio.settings.SettingsManager
|
||||
import org.oxycblt.auxio.util.newBroadcastIntent
|
||||
import org.oxycblt.auxio.util.newMainIntent
|
||||
|
||||
|
@ -46,10 +45,8 @@ class PlaybackNotification private constructor(
|
|||
private val context: Context,
|
||||
mediaToken: MediaSessionCompat.Token
|
||||
) : NotificationCompat.Builder(context, CHANNEL_ID) {
|
||||
private val settingsManager = SettingsManager.getInstance()
|
||||
|
||||
init {
|
||||
setSmallIcon(R.drawable.ic_song)
|
||||
setSmallIcon(R.drawable.ic_notif)
|
||||
setCategory(NotificationCompat.CATEGORY_SERVICE)
|
||||
setShowWhen(false)
|
||||
setSilent(true)
|
||||
|
|
|
@ -36,6 +36,7 @@ fun Any.logD(obj: Any) {
|
|||
*/
|
||||
fun Any.logD(msg: String) {
|
||||
if (BuildConfig.DEBUG) {
|
||||
basedCopyleftNotice()
|
||||
Log.d(getName(), msg)
|
||||
}
|
||||
}
|
||||
|
@ -53,3 +54,18 @@ fun Any.logE(msg: String) {
|
|||
* @return The name of the object, otherwise "Anonymous Object"
|
||||
*/
|
||||
private fun Any.getName(): String = "Auxio.${this::class.simpleName ?: "Anonymous Object"}"
|
||||
|
||||
/**
|
||||
* Nothing to see here.
|
||||
*/
|
||||
private fun basedCopyleftNotice() {
|
||||
if (BuildConfig.APPLICATION_ID != "org.oxycblt.auxio" &&
|
||||
BuildConfig.APPLICATION_ID != "org.oxycblt.auxio.debug"
|
||||
) {
|
||||
Log.d(
|
||||
"Auxio Project",
|
||||
"Friendly reminder: Auxio is licensed under the " +
|
||||
"GPLv3 and all modifications must be made open source!"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -159,6 +159,9 @@ fun createSmallWidget(context: Context, state: WidgetState): RemoteViews {
|
|||
|
||||
fun createMediumWidget(context: Context, state: WidgetState): RemoteViews {
|
||||
return createViews(context, R.layout.widget_medium)
|
||||
.applyMeta(state)
|
||||
.applyCover(context, state)
|
||||
.applyControls(context, state)
|
||||
}
|
||||
|
||||
fun createLargeWidget(context: Context, state: WidgetState): RemoteViews {
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
android:type="linear"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:color="#1565C0"
|
||||
android:color="#0D47A1"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#42A5F5"
|
||||
android:color="#64B5F6"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 14 KiB |
|
@ -5,7 +5,7 @@
|
|||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:pathData="m 53.999804,29.830211 v 26.856243 h -1.243335 -3.96875 -4.286044 l -6.614583,6.614583 v 4.087087 c -5e-5,0.01368 -0.0011,0.02713 -0.0011,0.04083 0,0.01368 0.0011,0.02714 0.0011,0.04083 v 4.086055 l 6.614583,6.614584 h 8.254794 l 6.614583,-6.614584 v -4.086055 c 5e-5,-0.01368 0.0011,-0.02713 0.0011,-0.04083 V 40.573226 h 10.74198 v -10.74198 z"
|
||||
android:pathData="M 53.999797,30.00003 V 56.66727 H 52.765254 48.82459 44.568872 l -6.567779,6.56803 v 4.05833 c -4.8e-5,0.0136 -0.0011,0.0269 -0.0011,0.0405 0,0.0136 0.0011,0.027 0.0011,0.0405 v 4.0573 l 6.567779,6.56804 h 8.196382 l 6.567788,-6.56804 v -4.0573 c 5e-5,-0.0133 9.92e-4,-0.0269 9.92e-4,-0.0405 V 40.667439 H 70.000006 V 30.001057 Z"
|
||||
android:strokeColor="#00000000"
|
||||
android:fillColor="#ffffff">
|
||||
</path>
|
||||
|
|
10
app/src/main/res/drawable/ic_notif.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M 11.999922,3.0000008 V 13.000215 H 11.536969 10.05922 8.463326 l -2.462917,2.463012 v 1.521871 C 6.000391,16.990198 6,16.995198 6,17.000298 c 0,0.0051 4.09e-4,0.01011 4.09e-4,0.0152 v 1.521487 l 2.462917,2.463014 h 3.073643 l 2.46292,-2.463014 v -1.521487 c 1.9e-5,-0.005 3.72e-4,-0.0101 3.72e-4,-0.0152 V 7.0002786 H 18 V 3.0003858 Z" />
|
||||
</vector>
|
BIN
app/src/main/res/mipmap-hdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 6.1 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 6.1 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 9.3 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 9.3 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
Normal file
After Width: | Height: | Size: 14 KiB |