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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ android {
minSdk = 26
targetSdk = 37
versionCode = 62
versionName = "18.0-beta.2"
versionName = "18.0-beta.3"

val whatsNewCounter = 2
buildConfigField("int", "WHATS_NEW_COUNTER", whatsNewCounter.toString())
Expand Down
16 changes: 15 additions & 1 deletion app/src/main/java/com/sameerasw/essentials/EssentialsApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,21 @@ class EssentialsApp : Application() {
"https://e105699467efe3a43a16bfbad3a63b33@o4510996760887296.ingest.de.sentry.io/4510996763312208"
options.isEnabled = true

options.setBeforeSend { event, _ ->
options.setBeforeSend { event, hint ->
try {
val throwable = event.throwable
val threadName = event.threads?.firstOrNull()?.name ?: Thread.currentThread().name
val message = event.message?.formatted ?: event.exceptions?.firstOrNull()?.value
com.sameerasw.essentials.utils.LogManager.saveCrashReport(
context = this@EssentialsApp,
threadName = threadName,
throwable = throwable,
customMessage = message,
)
} catch (e: Exception) {
android.util.Log.e("EssentialsApp", "Failed to save crash report locally in Sentry callback", e)
}

Handler(Looper.getMainLooper()).post {
Toast
.makeText(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1454,7 +1454,7 @@ object FeatureRegistry {
context: Context,
) = (
if (viewModel.isUseUsageAccess.value) {
viewModel.isUsageStatsPermissionGranted.value
viewModel.isUsageStatsPermissionGranted.value && viewModel.isAccessibilityEnabled.value
} else {
viewModel.isAccessibilityEnabled.value
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -686,15 +686,15 @@ class AodWallpaperOverlayHandler(

val wallpaperManager = WallpaperManager.getInstance(service)
val drawable: Drawable? =
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
wallpaperManager.getDrawable(WallpaperManager.FLAG_LOCK)
?: wallpaperManager.drawable
} else {
wallpaperManager.drawable
}

drawableToBitmap(drawable)
} catch (e: Exception) {
} catch (e: Throwable) {
Log.e("AodWallpaperOverlay", "Error extracting current wallpaper", e)
null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,11 +341,14 @@ class FeatureSettingsActivity : AppCompatActivity() {
!isOverlayPermissionGranted ||
!isNotificationLightingAccessibilityEnabled ||
!isNotificationListenerEnabled
"Flashlight pulse" -> !isNotificationListenerEnabled
"Notification Sync" -> !isNotificationListenerEnabled
"Button remap" -> !isAccessibilityEnabled
"Pocket mode" -> !isAccessibilityEnabled
"Dynamic night light" ->
(if (viewModel.isUseUsageAccess.value) !viewModel.isUsageStatsPermissionGranted.value else !isAccessibilityEnabled) ||
!isWriteSecureSettingsEnabled
"Smart pixels" -> !isAccessibilityEnabled
"Snooze system notifications" -> !isNotificationListenerEnabled
"Screen locked security" ->
!isAccessibilityEnabled ||
Expand Down Expand Up @@ -754,10 +757,12 @@ class FeatureSettingsActivity : AppCompatActivity() {
!isOverlayPermissionGranted ||
!isNotificationLightingAccessibilityEnabled ||
!isNotificationListenerEnabled
"Flashlight pulse" -> !isNotificationListenerEnabled
"Button remap" -> !isAccessibilityEnabled
"Dynamic night light" ->
(if (viewModel.isUseUsageAccess.value) !viewModel.isUsageStatsPermissionGranted.value else !isAccessibilityEnabled) ||
!isWriteSecureSettingsEnabled
"Smart pixels" -> !isAccessibilityEnabled
"Snooze system notifications" -> !isNotificationListenerEnabled
"Screen locked security" ->
!isAccessibilityEnabled ||
Expand Down
Loading
Loading