Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
bee1709
Disable android:allowBackup manifest setting
qiarie Oct 4, 2023
925cbdd
Remove theme
qiarie Oct 4, 2023
d911b22
Merge branch 'main' into clear-data
pld Oct 10, 2023
4459db2
Merge remote-tracking branch 'origin/main' into clear-data
qiarie Nov 27, 2023
de3ad00
Merge remote-tracking branch 'origin/main' into clear-data
qiarie May 17, 2024
80d97be
Merge remote-tracking branch 'origin/main' into clear-data
qiarie Aug 28, 2024
52ea6b6
Merge remote-tracking branch 'origin/main' into clear-data
qiarie Sep 2, 2024
d51b925
Update ClearData activity, viewModel & screen
qiarie Oct 1, 2024
ce7a90e
Merge remote-tracking branch 'origin/main' into clear-data
qiarie Oct 1, 2024
4669528
Update previews
qiarie Oct 1, 2024
2d1041e
Implement resource count and app name fetching
qiarie Oct 1, 2024
1c83758
Apply app theme
qiarie Oct 1, 2024
de9d6fa
Show delete app data warning if unsynced data present
qiarie Oct 1, 2024
a5100a4
Close activity & app after clearing data
qiarie Oct 2, 2024
6a09580
Merge remote-tracking branch 'origin/main' into clear-data
qiarie Jan 30, 2025
e0dfff6
Refactor clear data implementation
qiarie Feb 3, 2025
1541f6f
Merge remote-tracking branch 'origin/main' into clear-data
qiarie Feb 3, 2025
7e75f53
Merge remote-tracking branch 'origin/main' into clear-data
qiarie Feb 3, 2025
c90efa4
Merge remote-tracking branch 'origin/main' into clear-data
qiarie Jul 24, 2025
430e409
Merge remote-tracking branch 'origin/main' into clear-data
qiarie Mar 12, 2026
aaee3d4
Code cleanup
qiarie Mar 12, 2026
4bd1fa0
Update Kujaku dependency to 0.9.0
qiarie Mar 18, 2026
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
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ constructor(
}
}

fun isCurrentRefreshTokenActive() = isTokenActive(accountManager.getPassword(findAccount()))
fun isCurrentRefreshTokenActive() =
findAccount()?.let { isTokenActive(accountManager.getPassword(it)) } ?: false

private fun buildOAuthPayload(grantType: String) =
mutableMapOf(
Expand Down
2 changes: 1 addition & 1 deletion android/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ kotlinx-coroutines = "1.9.0"
kotlinx-serialization-json = "1.6.3"
kt3k-coveralls-ver="2.12.0"
ktlint = "0.50.0"
kujaku-library = "0.10.8-SNAPSHOT"
kujaku-library = "0.9.0"
kujaku-mapbox-sdk-turf = "7.2.0"
leakcanary-android = "2.10"
lifecycle= "2.8.7"
Expand Down
7 changes: 7 additions & 0 deletions android/quest/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@
android:allowBackup="false"
android:enableOnBackInvokedCallback="true"
android:hardwareAccelerated="true"
android:hasFragileUserData="true"
android:icon="@drawable/ic_launcher"
android:installLocation="internalOnly"
android:label="@string/app_name"
android:largeHeap="true"
android:manageSpaceActivity="org.smartregister.fhircore.quest.ui.cleardata.ClearDataActivity"
android:supportsRtl="true"
android:theme="@style/AppTheme.NoActionBar"
android:usesCleartextTraffic="false"
Expand All @@ -37,6 +39,7 @@
android:dataExtractionRules="@xml/data_extraction_rules"
tools:ignore="UnusedAttribute,LockedOrientationActivity"
tools:replace="android:allowBackup,android:theme">

<profileable
android:shell="true"
android:enabled="true"
Expand Down Expand Up @@ -83,6 +86,10 @@
android:theme="@style/AppTheme"
tools:replace="exported" />

<activity
android:name="org.smartregister.fhircore.quest.ui.cleardata.ClearDataActivity"
android:exported="false" />

<service
android:name=".ui.login.AuthAndroidService"
android:enabled="true"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright 2021-2024 Ona Systems, Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.smartregister.fhircore.quest.ui.cleardata

import android.os.Bundle
import androidx.activity.compose.setContent
import androidx.activity.viewModels
import dagger.hilt.android.AndroidEntryPoint
import org.smartregister.fhircore.engine.ui.base.BaseMultiLanguageActivity
import org.smartregister.fhircore.engine.ui.theme.AppTheme
import org.smartregister.fhircore.engine.util.extension.applyWindowInsetListener

@AndroidEntryPoint
class ClearDataActivity : BaseMultiLanguageActivity() {

private val viewModel by viewModels<ClearDataViewModel>()

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
applyWindowInsetListener()
setContent { AppTheme { ClearDataScreen(viewModel = viewModel) } }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright 2021-2024 Ona Systems, Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.smartregister.fhircore.quest.ui.cleardata

import android.content.Context

sealed class ClearDataEvent {
data class SyncData(val context: Context) : ClearDataEvent()

data class ClearAppData(val context: Context) : ClearDataEvent()

data object AbortClearData : ClearDataEvent()
}
Loading
Loading