updated many dependencies
parent
c41ce1d550
commit
63d18856f1
|
|
@ -7,6 +7,7 @@
|
|||
<option name="testRunner" value="GRADLE" />
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleJvm" value="Android Studio default JDK" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
|
|
|
|||
|
|
@ -26,5 +26,10 @@
|
|||
<option name="name" value="Google" />
|
||||
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="MavenRepo" />
|
||||
<option name="name" value="MavenRepo" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
|
|
|||
|
|
@ -16,20 +16,21 @@ configurations.all {
|
|||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
compileSdkVersion 32
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
jvmTarget = "11"
|
||||
}
|
||||
defaultConfig {
|
||||
applicationId "fr.forum_thalie.tsumugi"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 30
|
||||
versionCode 120
|
||||
versionName "1.2.0"
|
||||
targetSdkVersion 32
|
||||
multiDexEnabled true
|
||||
versionCode 121
|
||||
versionName "1.2.1"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
}
|
||||
|
|
@ -47,6 +48,9 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
def multidex_version = "2.0.1"
|
||||
implementation "androidx.multidex:multidex:$multidex_version"
|
||||
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
/*
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
|
|
@ -67,15 +71,18 @@ dependencies {
|
|||
|
||||
*/
|
||||
|
||||
implementation "androidx.media:media:1.1.0"
|
||||
implementation "androidx.media:media:1.5.0"
|
||||
|
||||
//noinspection GradleDependency
|
||||
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.2.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1'
|
||||
|
||||
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
||||
implementation 'androidx.preference:preference:1.1.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
||||
implementation 'androidx.preference:preference-ktx:1.2.0'
|
||||
|
||||
// jsoup HTML parser library @ https://jsoup.org/
|
||||
// implementation 'org.jsoup:jsoup:1.12.1'
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <!-- needed for API 28 -->
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.SET_ALARM"/>
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
|
||||
|
|
@ -22,8 +22,8 @@
|
|||
android:label="@string/app_name"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme.Launcher"
|
||||
tools:ignore="AllowBackup,GoogleAppIndexingWarning">
|
||||
|
||||
tools:ignore="AllowBackup,GoogleAppIndexingWarning"
|
||||
android:name="androidx.multidex.MultiDexApplication">
|
||||
<service
|
||||
android:name=".RadioService"
|
||||
android:enabled="true"
|
||||
|
|
@ -35,7 +35,8 @@
|
|||
|
||||
<receiver android:name=".BootBroadcastReceiver"
|
||||
android:directBootAware="true"
|
||||
tools:targetApi="n">
|
||||
tools:targetApi="n"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||
<action android:name="fr.forum_thalie.tsumugi.PLAY_OR_FALLBACK" />
|
||||
|
|
@ -47,9 +48,9 @@
|
|||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:configChanges="orientation|screenSize"
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="singleTask"
|
||||
android:screenOrientation="fullUser">
|
||||
android:screenOrientation="fullUser"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
|
|
@ -63,7 +64,8 @@
|
|||
android:parentActivityName=".MainActivity"
|
||||
android:screenOrientation="fullUser" />
|
||||
|
||||
<receiver android:name="androidx.media.session.MediaButtonReceiver">
|
||||
<receiver android:name="androidx.media.session.MediaButtonReceiver"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MEDIA_BUTTON" />
|
||||
</intent-filter>
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class AlarmFragment : PreferenceFragmentCompat() {
|
|||
|
||||
fun updateIsWakingUpSummary(preference: SwitchPreferenceCompat?, newValue: Boolean? = true, forceTime: Int? = null, forceDays: Set<String>? = null)
|
||||
{
|
||||
val dateLong = RadioAlarm.instance.findNextAlarmTime(context!!, forceTime, forceDays)
|
||||
val dateLong = RadioAlarm.instance.findNextAlarmTime(requireContext(), forceTime, forceDays)
|
||||
val calendar = Calendar.getInstance()
|
||||
calendar.timeInMillis = dateLong
|
||||
if (newValue == true && calendar.timeInMillis > 0)
|
||||
|
|
@ -65,14 +65,14 @@ class AlarmFragment : PreferenceFragmentCompat() {
|
|||
|
||||
val hourOfDayDefault = 7
|
||||
val minuteDefault = 0
|
||||
if (!PreferenceManager.getDefaultSharedPreferences(context!!).contains("alarmTimeFromMidnight"))
|
||||
if (!PreferenceManager.getDefaultSharedPreferences(requireContext()).contains("alarmTimeFromMidnight"))
|
||||
{
|
||||
PreferenceManager.getDefaultSharedPreferences(context!!).edit {
|
||||
PreferenceManager.getDefaultSharedPreferences(requireContext()).edit {
|
||||
putInt("alarmTimeFromMidnight", (60*hourOfDayDefault+minuteDefault))
|
||||
commit()
|
||||
}
|
||||
}
|
||||
val time = PreferenceManager.getDefaultSharedPreferences(context!!).getInt("alarmTimeFromMidnight", (60*hourOfDayDefault+minuteDefault))
|
||||
val time = PreferenceManager.getDefaultSharedPreferences(requireContext()).getInt("alarmTimeFromMidnight", (60*hourOfDayDefault+minuteDefault))
|
||||
val hourOfDay = time / 60
|
||||
val minute = time % 60
|
||||
timeSet?.summary = "${if (hourOfDay < 10) "0" else ""}$hourOfDay:${if (minute < 10) "0" else ""}$minute"
|
||||
|
|
@ -80,16 +80,16 @@ class AlarmFragment : PreferenceFragmentCompat() {
|
|||
|
||||
timeSet?.setOnPreferenceClickListener {
|
||||
val timePickerOnTimeSetListener = TimePickerDialog.OnTimeSetListener { _, hourOfDay, minute ->
|
||||
PreferenceManager.getDefaultSharedPreferences(context!!).edit {
|
||||
PreferenceManager.getDefaultSharedPreferences(requireContext()).edit {
|
||||
putInt("alarmTimeFromMidnight", (60*hourOfDay+minute))
|
||||
commit()
|
||||
}
|
||||
timeSet.summary = "${if (hourOfDay < 10) "0" else ""}$hourOfDay:${if (minute < 10) "0" else ""}$minute"
|
||||
RadioAlarm.instance.cancelAlarm(context!!)
|
||||
RadioAlarm.instance.setNextAlarm(context!!, isForce = true, forceTime = hourOfDay*60+minute)
|
||||
RadioAlarm.instance.cancelAlarm(requireContext())
|
||||
RadioAlarm.instance.setNextAlarm(requireContext(), isForce = true, forceTime = hourOfDay*60+minute)
|
||||
updateIsWakingUpSummary(isWakingUp, isWakingUp?.isChecked, forceTime = hourOfDay*60+minute)
|
||||
}
|
||||
val timeNew = PreferenceManager.getDefaultSharedPreferences(context!!).getInt("alarmTimeFromMidnight", 7*60)
|
||||
val timeNew = PreferenceManager.getDefaultSharedPreferences(requireContext()).getInt("alarmTimeFromMidnight", 7*60)
|
||||
val hourOfDayNew = timeNew / 60
|
||||
val minuteNew = timeNew % 60
|
||||
val timePicker = TimePickerDialog(context, timePickerOnTimeSetListener, hourOfDayNew, minuteNew, true)
|
||||
|
|
@ -103,8 +103,8 @@ class AlarmFragment : PreferenceFragmentCompat() {
|
|||
val fullWeek = weekdays.toSet()
|
||||
val workingWeek = weekdays.toSet().minusElement(weekdays.last()).minusElement(weekdays.elementAt(weekdays.size - 2))
|
||||
val listOfDays = when (newValue) {
|
||||
fullWeek -> context!!.getString(R.string.every_day)
|
||||
workingWeek -> context!!.getString(R.string.working_days)
|
||||
fullWeek -> requireContext().getString(R.string.every_day)
|
||||
workingWeek -> requireContext().getString(R.string.working_days)
|
||||
else -> {
|
||||
// build ORDERED LIST of days... I don't know why the original one is in shambles!!
|
||||
val fullWeekOrdered = weekdays
|
||||
|
|
@ -119,12 +119,12 @@ class AlarmFragment : PreferenceFragmentCompat() {
|
|||
preference?.summary = listOfDays
|
||||
}
|
||||
|
||||
updateDays(alarmDays, PreferenceManager.getDefaultSharedPreferences(context).getStringSet("alarmDays", setOf()))
|
||||
updateDays(alarmDays, PreferenceManager.getDefaultSharedPreferences(requireContext()).getStringSet("alarmDays", setOf()))
|
||||
alarmDays?.setOnPreferenceChangeListener { preference, newValue ->
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
updateDays(preference as MultiSelectListPreference, newValue as Set<String>)
|
||||
RadioAlarm.instance.cancelAlarm(context!!)
|
||||
RadioAlarm.instance.setNextAlarm(context!!, isForce = true, forceDays = newValue)
|
||||
RadioAlarm.instance.cancelAlarm(requireContext())
|
||||
RadioAlarm.instance.setNextAlarm(requireContext(), isForce = true, forceDays = newValue)
|
||||
updateIsWakingUpSummary(isWakingUp, isWakingUp?.isChecked, forceDays = newValue)
|
||||
true
|
||||
}
|
||||
|
|
@ -133,9 +133,9 @@ class AlarmFragment : PreferenceFragmentCompat() {
|
|||
|
||||
isWakingUp?.setOnPreferenceChangeListener { _, newValue ->
|
||||
if (newValue as Boolean)
|
||||
RadioAlarm.instance.setNextAlarm(context!!, isForce = true)
|
||||
RadioAlarm.instance.setNextAlarm(requireContext(), isForce = true)
|
||||
else
|
||||
RadioAlarm.instance.cancelAlarm(context!!)
|
||||
RadioAlarm.instance.cancelAlarm(requireContext())
|
||||
timeSet?.isEnabled = newValue
|
||||
alarmDays?.isEnabled = newValue
|
||||
snoozeDuration?.isEnabled = newValue
|
||||
|
|
|
|||
|
|
@ -1,16 +1,17 @@
|
|||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.3.72'
|
||||
ext.kotlin_version = '1.6.10'
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.1.1'
|
||||
classpath 'com.android.tools.build:gradle:7.1.2'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue