Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions .github/workflows/notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
PR_TITLE: ${{ github.event.pull_request.title }}
PR_URL: ${{ github.event.pull_request.html_url }}
PR_MERGED: ${{ github.event.pull_request.merged }}
PR_ADDITIONS: ${{ github.event.pull_request.additions }}
PR_DELETIONS: ${{ github.event.pull_request.deletions }}
EVENT_ACTION: ${{ github.event.action }}
EVENT_SENDER: ${{ github.event.sender.login }}
run: |
Expand Down Expand Up @@ -76,10 +78,15 @@ jobs:
elif [[ "$EVENT" == "pull_request" || "$EVENT" == "pull_request_target" ]]; then
ACTION="$EVENT_ACTION"
[[ "$ACTION" == "closed" && "$PR_MERGED" == "true" ]] && STATUS="💜 MERGED PR" || STATUS="🔵 PR $ACTION"

ADDITIONS=$(printf "%'d" "${PR_ADDITIONS:-0}" 2>/dev/null || echo "${PR_ADDITIONS:-0}")
DELETIONS=$(printf "%'d" "${PR_DELETIONS:-0}" 2>/dev/null || echo "${PR_DELETIONS:-0}")

{
echo "full_message<<EOF"
echo "<b>$STATUS: $REPO</b>"
echo "<a href='$PR_URL'>PR: $PR_TITLE</a> by @$EVENT_SENDER"
echo "<code>(+$ADDITIONS -$DELETIONS)</code>"
echo "EOF"
} >> "$GITHUB_OUTPUT"
fi
Expand Down
122 changes: 60 additions & 62 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ plugins {
alias(libs.plugins.ksp)
}




kotlin {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_21)
Expand All @@ -19,7 +16,7 @@ kotlin {
"androidx.compose.foundation.ExperimentalFoundationApi",
"androidx.compose.ui.text.ExperimentalTextApi",
"androidx.compose.foundation.ExperimentalFoundationApi",
"androidx.compose.foundation.layout.ExperimentalLayoutApi"
"androidx.compose.foundation.layout.ExperimentalLayoutApi",
)
}
}
Expand All @@ -29,62 +26,63 @@ android {
compileSdk = 37

androidResources {
localeFilters += listOf(
"en",
"ach",
"af",
"ar",
"bn",
"bn-rBD",
"ca",
"cs",
"da",
"de",
"el",
"es",
"fi",
"fil",
"fil-rPH",
"fr",
"he",
"hi",
"hi-rIN",
"hu",
"id",
"in",
"in-rID",
"it",
"iw",
"ja",
"kk",
"kk-rKZ",
"ko",
"ml",
"ml-rIN",
"ne",
"ne-rNP",
"nl",
"no",
"pl",
"pt",
"pt-rBR",
"pt-rPT",
"ro",
"ru",
"si",
"sk",
"sk-rSK",
"sr",
"sv",
"ta",
"ta-rIN",
"tr",
"uk",
"vi",
"zh",
"zh-rCN",
"zh-rTW"
)
localeFilters +=
listOf(
"en",
"ach",
"af",
"ar",
"bn",
"bn-rBD",
"ca",
"cs",
"da",
"de",
"el",
"es",
"fi",
"fil",
"fil-rPH",
"fr",
"he",
"hi",
"hi-rIN",
"hu",
"id",
"in",
"in-rID",
"it",
"iw",
"ja",
"kk",
"kk-rKZ",
"ko",
"ml",
"ml-rIN",
"ne",
"ne-rNP",
"nl",
"no",
"pl",
"pt",
"pt-rBR",
"pt-rPT",
"ro",
"ru",
"si",
"sk",
"sk-rSK",
"sr",
"sv",
"ta",
"ta-rIN",
"tr",
"uk",
"vi",
"zh",
"zh-rCN",
"zh-rTW",
)
}

defaultConfig {
Expand Down Expand Up @@ -119,7 +117,7 @@ android {
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
"proguard-rules.pro",
)
}
}
Expand Down Expand Up @@ -242,4 +240,4 @@ dependencies {
// AppFunctions API
implementation(libs.androidx.appfunctions)
ksp(libs.androidx.appfunctions.compiler)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ class ExampleInstrumentedTest {
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.sameerasw.essentials", appContext.packageName)
}
}
}
50 changes: 29 additions & 21 deletions app/src/main/java/com/sameerasw/essentials/EssentialsApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ class EssentialsApp : Application() {
private set
}

private val securityReceiver = com.sameerasw.essentials.services.receivers.SecurityReceiver()
private val securityReceiver =
com.sameerasw.essentials.services.receivers
.SecurityReceiver()

override fun onCreate() {
super.onCreate()
Expand All @@ -37,7 +39,6 @@ class EssentialsApp : Application() {
try {
resources?.configuration
} catch (e: Exception) {

}

try {
Expand All @@ -46,23 +47,31 @@ class EssentialsApp : Application() {
}

ShizukuUtils.initialize()
com.sameerasw.essentials.utils.LogManager.init(this)
com.sameerasw.essentials.utils.LogManager
.init(this)

// Init Automation
com.sameerasw.essentials.domain.diy.DIYRepository.init(this)
com.sameerasw.essentials.services.automation.AutomationManager.init(this)
com.sameerasw.essentials.services.CalendarSyncManager.init(this)
com.sameerasw.essentials.services.DeviceInfoSyncManager.init(this)
com.sameerasw.essentials.utils.ServiceUtils.startRequiredServices(this)

com.sameerasw.essentials.appfunctions.AppFunctionAvailabilityManager.updateAvailability(this)
com.sameerasw.essentials.domain.diy.DIYRepository
.init(this)
com.sameerasw.essentials.services.automation.AutomationManager
.init(this)
com.sameerasw.essentials.services.CalendarSyncManager
.init(this)
com.sameerasw.essentials.services.DeviceInfoSyncManager
.init(this)
com.sameerasw.essentials.utils.ServiceUtils
.startRequiredServices(this)

com.sameerasw.essentials.appfunctions.AppFunctionAvailabilityManager
.updateAvailability(this)

initSentry()

val intentFilter = IntentFilter().apply {
addAction(Intent.ACTION_SCREEN_OFF)
addAction(Intent.ACTION_USER_PRESENT)
}
val intentFilter =
IntentFilter().apply {
addAction(Intent.ACTION_SCREEN_OFF)
addAction(Intent.ACTION_USER_PRESENT)
}

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
registerReceiver(securityReceiver, intentFilter, RECEIVER_EXPORTED)
Expand All @@ -89,16 +98,15 @@ class EssentialsApp : Application() {

options.setBeforeSend { event, _ ->
Handler(Looper.getMainLooper()).post {
Toast.makeText(
this@EssentialsApp,
R.string.sentry_crash_toast,
Toast.LENGTH_LONG
).show()
Toast
.makeText(
this@EssentialsApp,
R.string.sentry_crash_toast,
Toast.LENGTH_LONG,
).show()
}
event
}
}
}

}

Loading
Loading