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
16 changes: 13 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.google.ksp)
alias(libs.plugins.kotlin.compose)
alias(libs.plugins.wire)
}

android {
Expand All @@ -16,8 +17,8 @@ android {
applicationId = "com.sameerasw.airsync"
minSdk = 30
targetSdk = 36
versionCode = 24
versionName = "2.6.0"
versionCode = 25
versionName = "3.0.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down Expand Up @@ -60,7 +61,7 @@ kotlin {
}

defaultConfig {
buildConfigField("String", "MIN_MAC_APP_VERSION", "\"2.6.0\"")
buildConfigField("String", "MIN_MAC_APP_VERSION", "\"3.0.0\"")
}
}

Expand Down Expand Up @@ -150,4 +151,13 @@ dependencies {
androidTestImplementation(libs.androidx.ui.test.junit4)
debugImplementation(libs.androidx.ui.tooling)
debugImplementation(libs.androidx.ui.test.manifest)

implementation(libs.wire.runtime)
implementation(libs.bouncycastle)
}

wire {
kotlin {
// Wire defaults to current project's proto directory
}
}
34 changes: 10 additions & 24 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@
<uses-permission android:name="android.permission.POST_PROMOTED_NOTIFICATIONS" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE" />

<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_WALLPAPER_INTERNAL" />



<!-- Permission for downloading updates -->
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />

Expand Down Expand Up @@ -87,30 +89,7 @@
</intent-filter>
</activity>

<!-- Share target activity for text sharing -->
<activity
android:name=".presentation.ui.activities.ShareActivity"
android:exported="true"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:noHistory="true">
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
<!-- Accept any single file type -->
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
</intent-filter>
<!-- Accept multiple files -->
<intent-filter>
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
</intent-filter>
</activity>


<activity
android:name=".presentation.ui.activities.ClipboardActionActivity"
Expand Down Expand Up @@ -181,6 +160,8 @@
</intent-filter>
</service>



<!-- Wake-up Service for receiving reconnection requests from Mac -->
<service
android:name=".service.WakeupService"
Expand All @@ -192,6 +173,11 @@
android:exported="false"
android:foregroundServiceType="connectedDevice" />

<service
android:name=".quickshare.QuickShareService"
android:exported="false"
android:foregroundServiceType="connectedDevice" />

<!-- Call Receiver - listens for telephony events -->
<receiver
android:name=".service.CallReceiver"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ class DataStoreManager(private val context: Context) {
private val USE_BLUR = booleanPreferencesKey("use_blur")
private val PITCH_BLACK_THEME = booleanPreferencesKey("pitch_black_theme")
private val SENTRY_REPORTING_ENABLED = booleanPreferencesKey("sentry_reporting_enabled")
private val QUICK_SHARE_ENABLED = booleanPreferencesKey("quick_share_enabled")

// Widget preferences
private val WIDGET_TRANSPARENCY = androidx.datastore.preferences.core.floatPreferencesKey("widget_transparency")
Expand Down Expand Up @@ -328,6 +329,18 @@ class DataStoreManager(private val context: Context) {
}
}

suspend fun setQuickShareEnabled(enabled: Boolean) {
context.dataStore.edit { preferences ->
preferences[QUICK_SHARE_ENABLED] = enabled
}
}

fun isQuickShareEnabled(): Flow<Boolean> {
return context.dataStore.data.map { preferences ->
preferences[QUICK_SHARE_ENABLED] ?: false // Default to disabled
}
}

suspend fun setDefaultTab(tab: String) {
context.dataStore.edit { prefs ->
prefs[DEFAULT_TAB] = tab
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,4 +287,12 @@ class AirSyncRepositoryImpl(
override fun hasRatedApp(): Flow<Boolean> {
return dataStoreManager.hasRatedApp()
}

override suspend fun setQuickShareEnabled(enabled: Boolean) {
dataStoreManager.setQuickShareEnabled(enabled)
}

override fun isQuickShareEnabled(): Flow<Boolean> {
return dataStoreManager.isQuickShareEnabled()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,6 @@ data class UiState(
val isBlurEnabled: Boolean = true,
val isSentryReportingEnabled: Boolean = true,
val isOnboardingCompleted: Boolean = true,
val widgetTransparency: Float = 1f
val widgetTransparency: Float = 1f,
val isQuickShareEnabled: Boolean = false
)
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,8 @@ interface AirSyncRepository {
fun getLastPromptDismissedVersion(): Flow<Int>
suspend fun setHasRatedApp(hasRated: Boolean)
fun hasRatedApp(): Flow<Boolean>

// Quick Share (receiving)
suspend fun setQuickShareEnabled(enabled: Boolean)
fun isQuickShareEnabled(): Flow<Boolean>
}

This file was deleted.

Loading