Merge branch 'devel'
commit
f42c705bab
|
|
@ -8,28 +8,6 @@
|
|||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
<option value="$PROJECT_DIR$/ExoPlayer/extensions/av1" />
|
||||
<option value="$PROJECT_DIR$/ExoPlayer/extensions/cast" />
|
||||
<option value="$PROJECT_DIR$/ExoPlayer/extensions/cronet" />
|
||||
<option value="$PROJECT_DIR$/ExoPlayer/extensions/ffmpeg" />
|
||||
<option value="$PROJECT_DIR$/ExoPlayer/extensions/flac" />
|
||||
<option value="$PROJECT_DIR$/ExoPlayer/extensions/gvr" />
|
||||
<option value="$PROJECT_DIR$/ExoPlayer/extensions/ima" />
|
||||
<option value="$PROJECT_DIR$/ExoPlayer/extensions/jobdispatcher" />
|
||||
<option value="$PROJECT_DIR$/ExoPlayer/extensions/leanback" />
|
||||
<option value="$PROJECT_DIR$/ExoPlayer/extensions/mediasession" />
|
||||
<option value="$PROJECT_DIR$/ExoPlayer/extensions/okhttp" />
|
||||
<option value="$PROJECT_DIR$/ExoPlayer/extensions/opus" />
|
||||
<option value="$PROJECT_DIR$/ExoPlayer/extensions/rtmp" />
|
||||
<option value="$PROJECT_DIR$/ExoPlayer/extensions/vp9" />
|
||||
<option value="$PROJECT_DIR$/ExoPlayer/extensions/workmanager" />
|
||||
<option value="$PROJECT_DIR$/ExoPlayer/library/all" />
|
||||
<option value="$PROJECT_DIR$/ExoPlayer/library/core" />
|
||||
<option value="$PROJECT_DIR$/ExoPlayer/library/dash" />
|
||||
<option value="$PROJECT_DIR$/ExoPlayer/library/hls" />
|
||||
<option value="$PROJECT_DIR$/ExoPlayer/library/smoothstreaming" />
|
||||
<option value="$PROJECT_DIR$/ExoPlayer/library/ui" />
|
||||
<option value="$PROJECT_DIR$/ExoPlayer/testutils" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
</set>
|
||||
</option>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,5 @@
|
|||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/ExoPlayer" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 24a19264dbf35e326bbd7bb36c232eb180e1e26d
|
||||
|
|
@ -29,8 +29,8 @@ android {
|
|||
applicationId "fr.forum_thalie.tsumugi"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 29
|
||||
versionCode 113
|
||||
versionName "1.1.3"
|
||||
versionCode 115
|
||||
versionName "1.1.5"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
}
|
||||
|
|
@ -69,11 +69,11 @@ dependencies {
|
|||
*/
|
||||
|
||||
implementation "androidx.media:media:1.1.0"
|
||||
//implementation 'com.google.android.exoplayer:exoplayer:2.11.1'
|
||||
implementation project(':exoplayer-library') // uses local ExoPlayer clone, from dev-v2 branch (fixes ISO-8859-1 ICY metadata
|
||||
implementation 'com.google.android.exoplayer:exoplayer:2.11.3'
|
||||
//implementation project(':exoplayer-library') // uses local ExoPlayer clone, from dev-v2 branch (fixes ISO-8859-1 ICY metadata
|
||||
|
||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.1.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
|
||||
|
||||
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
||||
implementation 'androidx.preference:preference:1.1.0'
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
android:configChanges="orientation|screenSize"
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="singleTask"
|
||||
android:screenOrientation="fullSensor">
|
||||
android:screenOrientation="fullUser">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
|
|
|
|||
|
|
@ -62,5 +62,5 @@
|
|||
}
|
||||
],
|
||||
"regular_programme" : "Programmation habituelle",
|
||||
"timezone": "GMT+1"
|
||||
"timezone": "Europe/Paris"
|
||||
}
|
||||
|
|
@ -39,7 +39,7 @@ class NowPlayingNotification(
|
|||
|
||||
mediaStyle = androidx.media.app.NotificationCompat.DecoratedMediaCustomViewStyle().also {
|
||||
it.setMediaSession(m.sessionToken)
|
||||
it.setShowActionsInCompactView(0) // index 0 = show actions 0 and 1 (show action #0 (play/pause))
|
||||
it.setShowActionsInCompactView(0, 1) // index 0 = show actions 0 and 1 (show action #0 (play/pause))
|
||||
it.setCancelButtonIntent(deleteIntent)
|
||||
}
|
||||
builder.setStyle(mediaStyle)
|
||||
|
|
@ -83,7 +83,7 @@ class NowPlayingNotification(
|
|||
val intent2 = Intent(c, RadioService::class.java)
|
||||
intent2.putExtra("action", Actions.KILL.name)
|
||||
val pendingButtonIntent = PendingIntent.getService(c, 2, intent2, PendingIntent.FLAG_UPDATE_CURRENT)
|
||||
val stopAction = NotificationCompat.Action.Builder(R.drawable.ic_stop,"Stop", pendingButtonIntent).build()
|
||||
val stopAction = NotificationCompat.Action.Builder(R.drawable.ic_close,"Stop", pendingButtonIntent).build()
|
||||
builder.addAction(stopAction)
|
||||
|
||||
if (isRinging) {
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ class RadioService : MediaBrowserServiceCompat() {
|
|||
}
|
||||
1 -> {
|
||||
//[REMOVE LOG CALLS]Log.d(tag, radioTag + "Headset is plugged")
|
||||
headsetPluggedIn = true
|
||||
headsetPluggedIn = true && PreferenceManager.getDefaultSharedPreferences(context).getBoolean("autoStartOnPlug", false)
|
||||
}
|
||||
else -> {
|
||||
//[REMOVE LOG CALLS]Log.d(tag, radioTag + "I have no idea what the headset state is")
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import org.json.JSONObject
|
|||
import java.net.URL
|
||||
import java.text.ParseException
|
||||
import java.text.SimpleDateFormat
|
||||
import java.time.format.TextStyle
|
||||
import java.util.*
|
||||
import kotlin.collections.ArrayList
|
||||
|
||||
|
|
@ -61,7 +62,7 @@ class PlayerStore {
|
|||
{
|
||||
val dateFormat = SimpleDateFormat("yyyy-MM-dd hh:mm:ss z", Locale.getDefault())
|
||||
try {
|
||||
val t: Date? = dateFormat.parse("$s ${Planning.instance.timeZone.id}")
|
||||
val t: Date? = dateFormat.parse("$s ${Planning.instance.timeZone.getDisplayName(Planning.instance.timeZone.useDaylightTime(), TimeZone.SHORT)}")
|
||||
//[REMOVE LOG CALLS]Log.d(tag, "date: $s -> $t")
|
||||
return t!!.time
|
||||
} catch (e: ParseException) {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
package fr.forum_thalie.tsumugi.preferences
|
||||
|
||||
import android.app.TimePickerDialog
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.content.edit
|
||||
import androidx.preference.*
|
||||
import fr.forum_thalie.tsumugi.*
|
||||
|
|
@ -11,6 +13,12 @@ import fr.forum_thalie.tsumugi.alarm.RadioAlarm
|
|||
import java.util.*
|
||||
|
||||
class AlarmFragment : PreferenceFragmentCompat() {
|
||||
|
||||
override fun onAttach(context: Context) {
|
||||
(activity as AppCompatActivity).supportActionBar?.title = context.getString(R.string.setupAlarmClock)
|
||||
super.onAttach(context)
|
||||
}
|
||||
|
||||
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
||||
setPreferencesFromResource(R.xml.alarm_preferences, rootKey)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,19 @@
|
|||
package fr.forum_thalie.tsumugi.preferences
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.preference.*
|
||||
import fr.forum_thalie.tsumugi.R
|
||||
import fr.forum_thalie.tsumugi.preferenceStore
|
||||
|
||||
class CustomizeFragment : PreferenceFragmentCompat() {
|
||||
override fun onAttach(context: Context) {
|
||||
(activity as AppCompatActivity).supportActionBar?.title = context.getString(R.string.customizeAppBehavior)
|
||||
super.onAttach(context)
|
||||
}
|
||||
|
||||
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
||||
setPreferencesFromResource(R.xml.customize_preferences, rootKey)
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,14 @@ import android.net.Uri
|
|||
import android.os.Bundle
|
||||
import fr.forum_thalie.tsumugi.R
|
||||
import android.annotation.SuppressLint
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.preference.*
|
||||
|
||||
class MainPreferenceFragment : PreferenceFragmentCompat() {
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
(activity as AppCompatActivity).supportActionBar?.title = context?.getString(R.string.settings)
|
||||
}
|
||||
|
||||
@SuppressLint("ApplySharedPref")
|
||||
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
||||
|
|
|
|||
|
|
@ -1,13 +1,20 @@
|
|||
package fr.forum_thalie.tsumugi.preferences
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
import androidx.preference.*
|
||||
import fr.forum_thalie.tsumugi.R
|
||||
import android.text.InputType
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import fr.forum_thalie.tsumugi.alarm.RadioSleeper
|
||||
|
||||
|
||||
class SleepFragment : PreferenceFragmentCompat() {
|
||||
override fun onAttach(context: Context) {
|
||||
(activity as AppCompatActivity).supportActionBar?.title = context.getString(R.string.setSleepTimer)
|
||||
super.onAttach(context)
|
||||
}
|
||||
|
||||
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
||||
setPreferencesFromResource(R.xml.sleep_preference, rootKey)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
package fr.forum_thalie.tsumugi.ui.nowplaying
|
||||
|
||||
import android.widget.SeekBar
|
||||
import androidx.core.content.edit
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.ViewModel
|
||||
import fr.forum_thalie.tsumugi.playerstore.PlayerStore
|
||||
import fr.forum_thalie.tsumugi.preferenceStore
|
||||
|
||||
class NowPlayingViewModel: ViewModel() {
|
||||
|
||||
|
|
@ -21,6 +23,10 @@ class NowPlayingViewModel: ViewModel() {
|
|||
override fun onProgressChanged(seekBar: SeekBar, progress: Int, fromUser: Boolean) {
|
||||
// updated continuously as the user slides the thumb
|
||||
PlayerStore.instance.volume.value = progress
|
||||
preferenceStore.edit {
|
||||
putInt("volume", progress)
|
||||
commit()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onStartTrackingTouch(seekBar: SeekBar) {
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
package fr.forum_thalie.tsumugi.ui.programme
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.util.TypedValue
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import android.widget.TextView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.widget.TextViewCompat
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import fr.forum_thalie.tsumugi.*
|
||||
import fr.forum_thalie.tsumugi.R
|
||||
import fr.forum_thalie.tsumugi.colorAccent
|
||||
import fr.forum_thalie.tsumugi.colorWhited
|
||||
import fr.forum_thalie.tsumugi.planning.Planning
|
||||
import fr.forum_thalie.tsumugi.planning.Programme
|
||||
import fr.forum_thalie.tsumugi.weekdaysSundayFirst
|
||||
import java.util.*
|
||||
import kotlin.collections.ArrayList
|
||||
|
||||
class ProgrammeAdapter(private val dataSet: ArrayList<Programme>, private val day: String
|
||||
/*,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="#FFFFFF"
|
||||
android:alpha="0.8">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
|
||||
</vector>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 205 B |
Binary file not shown.
|
After Width: | Height: | Size: 157 B |
Binary file not shown.
|
After Width: | Height: | Size: 235 B |
Binary file not shown.
|
After Width: | Height: | Size: 318 B |
|
|
@ -37,16 +37,16 @@
|
|||
<string name="lp">Derniers titres</string>
|
||||
<string name="programme">Planning</string>
|
||||
<string name="regular_programme">Programme régulier</string>
|
||||
<string name="useAlarmClock">Activer l\'alarme</string>
|
||||
<string name="useAlarmClock">Activer le réveil</string>
|
||||
<string name="setTime">Choisir l\'heure</string>
|
||||
<string name="selectDaysOfWeek">Choisir les jours</string>
|
||||
<string name="SetSnoozeDuration">Choisir le délai de répétition d\'alarme (minutes)</string>
|
||||
<string name="volumeAtStartup">Volume au démarrage</string>
|
||||
<string name="useHorizontalSplitLayout">Utiliser une disposition horizontale adaptée</string>
|
||||
<string name="makeSnackbarsPersistent">Rendre les barres d\information persistantes</string>
|
||||
<string name="setupAlarmClock">Configurer l\'alarme</string>
|
||||
<string name="setSleepTimer">Configurer la minuterie avant extinction</string>
|
||||
<string name="costumizeAppBehavior">Paramètres de l\'application</string>
|
||||
<string name="setupAlarmClock">Réveil</string>
|
||||
<string name="setSleepTimer">Minuterie avant extinction</string>
|
||||
<string name="customizeAppBehavior">Comportement de l\'application</string>
|
||||
<string name="submitABug">Reporter un bug</string>
|
||||
<string name="sleepClosesApp">Minuterie avant fermeture de l\'application</string>
|
||||
<string name="setSleepDuration">Choisir une durée (en minutes)</string>
|
||||
|
|
@ -54,5 +54,7 @@
|
|||
<string name="fetchPeriod">Choisir la fréquence de mise à jour quand la radio est stoppée</string>
|
||||
<string name="refreshing">Actualisation…</string>
|
||||
<string name="action_refresh">Raffraîchir les données</string>
|
||||
<string name="autoPlay">\"Play\" au branchement de la prise casque</string>
|
||||
<string name="settings">Paramètres</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -64,9 +64,9 @@
|
|||
<string name="volumeAtStartup">Volume at startup</string>
|
||||
<string name="useHorizontalSplitLayout">Use horizontal split layout</string>
|
||||
<string name="makeSnackbarsPersistent">Make Snackbars persistent</string>
|
||||
<string name="setupAlarmClock">Set up alarm clock</string>
|
||||
<string name="setSleepTimer">Set sleep timer</string>
|
||||
<string name="costumizeAppBehavior">Customize app behavior</string>
|
||||
<string name="setupAlarmClock">Alarm</string>
|
||||
<string name="setSleepTimer">Sleep timer</string>
|
||||
<string name="customizeAppBehavior">Customize app behavior</string>
|
||||
<string name="submitABug">Submit a bug (opens GitHub in a web browser)</string>
|
||||
<string name="sleepClosesApp">Sleep - close app after some time</string>
|
||||
<string name="setSleepDuration">Set duration (minutes)</string>
|
||||
|
|
@ -74,5 +74,7 @@
|
|||
<string name="fetchPeriod">Set update period when stopped</string>
|
||||
<string name="refreshing">Refreshing data…</string>
|
||||
<string name="action_refresh">Refresh data</string>
|
||||
<string name="autoPlay">Auto play when plugging headphones</string>
|
||||
<string name="settings">Settings</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<!--
|
||||
<SeekBarPreference
|
||||
app:key="volume"
|
||||
app:iconSpaceReserved="false"
|
||||
|
|
@ -12,6 +12,14 @@
|
|||
android:defaultValue="100"
|
||||
app:showSeekBarValue="true"
|
||||
/>
|
||||
-->
|
||||
<SwitchPreferenceCompat
|
||||
app:key="autoStartOnPlug"
|
||||
app:iconSpaceReserved="false"
|
||||
app:title="@string/autoPlay"
|
||||
app:singleLineTitle="false"
|
||||
app:defaultValue="false"
|
||||
/>
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
app:key="splitLayout"
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
<Preference
|
||||
app:icon="@drawable/ic_customize"
|
||||
app:key="CustomizeFragment"
|
||||
app:title="@string/costumizeAppBehavior"
|
||||
app:title="@string/customizeAppBehavior"
|
||||
app:fragment="fr.forum_thalie.tsumugi.preferences.CustomizeFragment"
|
||||
/>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,2 @@
|
|||
include ':app'
|
||||
rootProject.name='Tsumugi-app'
|
||||
|
||||
gradle.ext.exoplayerRoot = './ExoPlayer'
|
||||
gradle.ext.exoplayerModulePrefix = 'exoplayer-'
|
||||
apply from: new File(gradle.ext.exoplayerRoot, 'core_settings.gradle')
|
||||
|
|
|
|||
Loading…
Reference in New Issue