Skip to content

Commit

Permalink
Merge pull request #65 from WrichikBasu/dev
Browse files Browse the repository at this point in the history
Upgrade to Android 14
  • Loading branch information
WrichikBasu authored Aug 30, 2023
2 parents e0a3ca0 + 373f720 commit 35ff6d3
Show file tree
Hide file tree
Showing 56 changed files with 4,597 additions and 2,452 deletions.
45 changes: 24 additions & 21 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,25 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
apply plugin: 'com.android.application'

android {
compileSdkVersion 31
buildToolsVersion "31.0.0"
namespace 'in.basulabs.shakealarmclock'

compileSdk 34

defaultConfig {
applicationId "in.basulabs.shakealarmclock"
minSdkVersion 21
targetSdkVersion 31
versionCode 29
versionName "3.0.0"
targetSdkVersion 34
versionCode 31
versionName "4.0.0-beta.2"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

compileOptions {
coreLibraryDesugaringEnabled true

sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

buildTypes {
Expand All @@ -45,29 +46,31 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

lintOptions {
lint {
disable 'ApplySharedPref'
}

}

dependencies {

implementation 'androidx.legacy:legacy-support-v4:1.0.0'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3'
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "androidx.work:work-runtime:2.7.1"
implementation 'com.github.WrichikBasu:AudioFocusController:v2.1'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation "androidx.room:room-runtime:2.4.1"
annotationProcessor "androidx.room:room-compiler:2.4.1"
implementation "androidx.work:work-runtime:2.8.1"
implementation 'com.github.WrichikBasu:AudioFocusController:3.0.1'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation "androidx.room:room-runtime:2.5.2"
annotationProcessor "androidx.room:room-compiler:2.5.2"
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.recyclerview:recyclerview:1.3.1'
implementation 'com.google.android.material:material:1.9.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'com.github.cachapa:ExpandableLayout:2.9.2'
implementation 'com.google.code.gson:gson:2.10.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

}
}
6 changes: 5 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#-renamesourcefileattribute SourceFile

# For GSON. Source: https://stackoverflow.com/a/71326366/8387076
-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken
-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken
114 changes: 74 additions & 40 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
<?xml version="1.0" encoding="utf-8"?><!--
Copyright (C) 2022 Wrichik Basu ([email protected])
This program is free software: you can redistribute it and/or modify
Expand All @@ -17,21 +16,33 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="in.basulabs.shakealarmclock"
android:installLocation="internalOnly">

<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
<uses-permission
android:name="android.permission.SCHEDULE_EXACT_ALARM"
android:maxSdkVersion="32" />
<uses-permission android:name="android.permission.USE_EXACT_ALARM" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.SET_ALARM" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
<uses-permission android:name="com.android.alarm.permission.SET_ALARM" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

<uses-feature android:name="android.hardware.audio.output" android:required="true"/>
<uses-feature android:name="android.hardware.sensor.accelerometer" android:required="true"/>
<uses-feature
android:name="android.hardware.audio.output"
android:required="true" />
<uses-feature
android:name="android.hardware.sensor.accelerometer"
android:required="true" />

<application
android:allowBackup="true"
Expand Down Expand Up @@ -63,25 +74,37 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
tools:node="remove"/>-->

<provider
android:name=".MyWorkManagerInitializer"
android:authorities="in.basulabs.shakealarmclock.MyWorkManagerInitializer"
android:name=".backend.MyWorkManagerInitializer"
android:authorities="in.basulabs.shakealarmclock.backend.MyWorkManagerInitializer"
android:exported="false" />

<service
android:name=".Service_SnoozeAlarm"
android:name=".backend.Service_SnoozeAlarm"
android:enabled="true"
android:exported="false"/>
android:exported="false"
android:foregroundServiceType="specialUse">
<property
android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
android:value="Invoked when a ringing alarm is snoozed; stays foreground during the snooze duration,
starts Service_RingAlarm at the end of the snooze duration, and sets a repeat alarm if the alarm is
dismissed while being snoozed." />
</service>

<service
android:name=".Service_RingAlarm"
android:name=".backend.Service_RingAlarm"
android:enabled="true"
android:exported="false"/>
android:exported="false"
android:foregroundServiceType="specialUse">
<property
android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
android:value="Invoked when an alarm rings; controls the ringing alarm sound, and the ability to
dismiss the alarm by shaking (which is the main feature of the app)." />
</service>

<receiver
android:name=".AlarmBroadcastReceiver"
android:name=".backend.AlarmBroadcastReceiver"
android:enabled="true"
android:exported="true"
tools:ignore="ExportedReceiver">
android:exported="true">
<intent-filter>
<action android:name="in.basulabs.shakealarmclock.DELIVER_ALARM" />
</intent-filter>
Expand All @@ -90,39 +113,40 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
</intent-filter>
</receiver>

<activity android:name=".Activity_AlarmsList"
<activity
android:name=".frontend.Activity_AlarmsList"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SHOW_ALARMS"/>
<category android:name="android.intent.category.DEFAULT"/>
<action android:name="android.intent.action.SHOW_ALARMS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

<activity
android:name=".Activity_AlarmDetails"
android:name=".frontend.Activity_AlarmDetails"
android:enabled="true"
android:exported="false"
android:parentActivityName=".Activity_AlarmsList" />
android:parentActivityName=".frontend.Activity_AlarmsList" />

<activity
android:name=".Activity_RingAlarm"
android:enabled="true"
android:exported="false"
android:name=".frontend.Activity_RingAlarm"
android:configChanges="orientation|keyboard"
android:enabled="true"
android:excludeFromRecents="true"
android:exported="false"
android:noHistory="true"
android:screenOrientation="sensorPortrait"
android:showOnLockScreen="true"
android:taskAffinity=""
android:theme="@style/Theme.AppCompat.Light.NoActionBar" />

<activity
android:name=".Activity_RingtonePicker"
android:name=".frontend.Activity_RingtonePicker"
android:enabled="true"
android:exported="true"
android:theme="@style/Theme.AppCompat.DayNight.NoActionBar">
Expand All @@ -133,37 +157,47 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
</activity>

<activity
android:name=".Activity_Settings"
android:name=".frontend.Activity_Settings"
android:enabled="true"
android:exported="false"
android:parentActivityName=".Activity_AlarmsList" />
android:parentActivityName=".frontend.Activity_AlarmsList" />

<service
android:name=".Service_UpdateAlarm"
android:name=".backend.Service_SetAlarmsPostBoot"
android:enabled="true"
android:exported="true"
android:permission="in.basulabs.shakealarmclock.PLUGIN_PERMISSION" />
android:foregroundServiceType="specialUse">
<property
android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
android:value="Sets the alarms after a device reboot, and posts an alarm missed notification." />
</service>

<activity android:name=".Activity_IntentManager"
<activity
android:name=".frontend.Activity_IntentManager"
android:configChanges="uiMode|orientation|keyboard|colorMode"
android:enabled="true"
android:exported="true"
android:theme="@style/Theme.AppCompat.Translucent"
android:configChanges="uiMode|orientation|keyboard|colorMode">
android:theme="@style/Theme.AppCompat.Translucent">

<intent-filter>
<action android:name="android.intent.action.DISMISS_ALARM"/>
<action android:name="android.intent.action.SET_ALARM"/>
<action android:name="android.intent.action.SNOOZE_ALARM"/>
<action android:name="android.intent.action.DISMISS_ALARM" />
<action android:name="android.intent.action.SET_ALARM" />
<action android:name="android.intent.action.SNOOZE_ALARM" />

<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>

</activity>

<activity
android:name=".Activity_RequestPerm"
android:exported="false"
android:enabled="false"/>
android:name=".frontend.Activity_ListReqPerm"
android:enabled="true"
android:exported="false" />

<activity
android:name=".frontend.Activity_RequestPermIntro"
android:enabled="true"
android:exported="false" />

</application>

Expand Down

This file was deleted.

Loading

0 comments on commit 35ff6d3

Please sign in to comment.