Skip to content

Commit 1fb4b5d

Browse files
committed
Change whole wording of environments
1 parent b70ef1f commit 1fb4b5d

25 files changed

+81
-96
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ Evaluations in Sapio are given to the community by the community.
2626

2727
**microG** The device has microG installed
2828

29-
**user** The device is not considered rooted
29+
**secure** The device is considered secured
3030

31-
**root** The device is considered rooted
31+
**risky** The device is considered risky
3232

3333
# 🔨 Build
3434
## Get the sources

app/src/main/java/com/klee/sapio/data/DeviceConfiguration.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ class DeviceConfiguration @Inject constructor(
4141
return type
4242
}
4343

44-
fun isRooted(): Int {
44+
fun isRisky(): Int {
4545
return if (RootBeer(mContext).isRooted) {
46-
Label.ROOTED
46+
Label.RISKY
4747
} else {
48-
Label.USER
48+
Label.SECURE
4949
}
5050
}
5151
}

app/src/main/java/com/klee/sapio/data/EvaluationRepositoryImpl.kt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,35 +32,35 @@ class EvaluationRepositoryImpl @Inject constructor() :
3232
retrofitService.updateEvaluation(header, id)
3333
}
3434

35-
override suspend fun fetchMicrogUserEvaluation(appPackageName: String): Evaluation? {
35+
override suspend fun fetchMicrogSecureEvaluation(appPackageName: String): Evaluation? {
3636
return retrofitService.fetchEvaluation(
3737
appPackageName,
3838
Label.MICROG,
39-
Label.USER
39+
Label.SECURE
4040
)
4141
}
4242

43-
override suspend fun fetchMicrogRootEvaluation(appPackageName: String): Evaluation? {
43+
override suspend fun fetchMicrogRiskyEvaluation(appPackageName: String): Evaluation? {
4444
return retrofitService.fetchEvaluation(
4545
appPackageName,
4646
Label.MICROG,
47-
Label.ROOTED
47+
Label.RISKY
4848
)
4949
}
5050

51-
override suspend fun fetchBareAospUserEvaluation(appPackageName: String): Evaluation? {
51+
override suspend fun fetchBareAospSecureEvaluation(appPackageName: String): Evaluation? {
5252
return retrofitService.fetchEvaluation(
5353
appPackageName,
5454
Label.BARE_AOSP,
55-
Label.USER
55+
Label.SECURE
5656
)
5757
}
5858

59-
override suspend fun fetchBareAospRootEvaluation(appPackageName: String): Evaluation? {
59+
override suspend fun fetchBareAospRiskyEvaluation(appPackageName: String): Evaluation? {
6060
return retrofitService.fetchEvaluation(
6161
appPackageName,
6262
Label.BARE_AOSP,
63-
Label.ROOTED
63+
Label.RISKY
6464
)
6565
}
6666

app/src/main/java/com/klee/sapio/data/Models.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ data class Evaluation(
4040
@JsonProperty("icon") var icon: Icon?,
4141
@JsonProperty("rating") val rating: Int,
4242
@JsonProperty("microg") val microg: Int,
43-
@JsonProperty("rooted") val rooted: Int,
43+
@JsonProperty("rooted") val secure: Int,
4444
@JsonProperty("updatedAt") val updatedAt: Date?,
4545
@JsonProperty("createdAt") val createdAt: Date?,
4646
@JsonProperty("publishedAt") val publishedAt: Date?,
@@ -140,17 +140,17 @@ object GmsType {
140140
}
141141

142142
object UserType {
143-
const val USER = 3
144-
const val ROOT = 4
143+
const val SECURE = 3
144+
const val RISKY = 4
145145
}
146146

147147
data class Label(val text: String, val color: Int) {
148148

149149
companion object {
150150
const val MICROG = GmsType.MICROG
151151
const val BARE_AOSP = GmsType.BARE_AOSP
152-
const val USER = UserType.USER
153-
const val ROOTED = UserType.ROOT
152+
const val SECURE = UserType.SECURE
153+
const val RISKY = UserType.RISKY
154154

155155
@RequiresApi(Build.VERSION_CODES.M)
156156
fun create(context: Context, label: Int): Label {
@@ -161,11 +161,11 @@ data class Label(val text: String, val color: Int) {
161161
BARE_AOSP -> Label(
162162
context.getString(R.string.bare_aosp_label), context.getColor(R.color.blue_700)
163163
)
164-
USER -> Label(
165-
context.getString(R.string.user_label), context.getColor(R.color.purple_200)
164+
SECURE -> Label(
165+
context.getString(R.string.secure_label), context.getColor(R.color.purple_200)
166166
)
167-
ROOTED -> Label(
168-
context.getString(R.string.rooted_label), context.getColor(R.color.purple_700)
167+
RISKY -> Label(
168+
context.getString(R.string.risky_label), context.getColor(R.color.purple_700)
169169
)
170170
else -> Label(" Empty label ", context.getColor(R.color.black))
171171
}

app/src/main/java/com/klee/sapio/data/Settings.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ class Settings @Inject constructor(
1111

1212
fun getRootConfigurationLevel(): Int {
1313
return if (isRootConfigurationEnabled()) {
14-
UserType.ROOT
14+
UserType.RISKY
1515
} else {
16-
UserType.USER
16+
UserType.SECURE
1717
}
1818
}
1919

app/src/main/java/com/klee/sapio/domain/EvaluateAppUseCase.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import com.klee.sapio.data.DeviceConfiguration
44
import com.klee.sapio.data.InstalledApplication
55
import com.klee.sapio.data.IconAnswer
66
import com.klee.sapio.data.UploadEvaluation
7-
import com.klee.sapio.data.Evaluation
8-
import com.klee.sapio.ui.view.EvaluateFragment
97
import kotlinx.coroutines.Dispatchers
108
import kotlinx.coroutines.withContext
119
import retrofit2.Response
@@ -68,7 +66,7 @@ class EvaluateAppUseCase @Inject constructor() {
6866
iconId,
6967
rating,
7068
mDeviceConfiguration.getGmsType(),
71-
mDeviceConfiguration.isRooted()
69+
mDeviceConfiguration.isRisky()
7270
)
7371

7472
mEvaluationRepository.addEvaluation(newEvaluation)

app/src/main/java/com/klee/sapio/domain/EvaluationRepository.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ interface EvaluationRepository {
1717

1818
suspend fun updateEvaluation(evaluation: UploadEvaluation, id: Int)
1919

20-
suspend fun fetchMicrogUserEvaluation(appPackageName: String): Evaluation?
20+
suspend fun fetchMicrogSecureEvaluation(appPackageName: String): Evaluation?
2121

22-
suspend fun fetchMicrogRootEvaluation(appPackageName: String): Evaluation?
22+
suspend fun fetchMicrogRiskyEvaluation(appPackageName: String): Evaluation?
2323

24-
suspend fun fetchBareAospUserEvaluation(appPackageName: String): Evaluation?
24+
suspend fun fetchBareAospSecureEvaluation(appPackageName: String): Evaluation?
2525

26-
suspend fun fetchBareAospRootEvaluation(appPackageName: String): Evaluation?
26+
suspend fun fetchBareAospRiskyEvaluation(appPackageName: String): Evaluation?
2727

2828
suspend fun existingEvaluations(packageName: String): List<StrapiElement>
2929

Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
package com.klee.sapio.domain
22

33
import com.klee.sapio.data.Evaluation
4-
import com.klee.sapio.data.EvaluationRepositoryImpl
54
import javax.inject.Inject
65

7-
class FetchAppMicrogRootEvaluationUseCase @Inject constructor() {
6+
class FetchAppBareAospRiskyEvaluationUseCase @Inject constructor() {
87

98
@Inject
109
lateinit var evaluationRepository: EvaluationRepository
1110

1211
suspend operator fun invoke(packageName: String): Evaluation? {
13-
return evaluationRepository.fetchMicrogRootEvaluation(packageName)
12+
return evaluationRepository.fetchBareAospRiskyEvaluation(packageName)
1413
}
1514
}
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
package com.klee.sapio.domain
22

33
import com.klee.sapio.data.Evaluation
4-
import com.klee.sapio.data.EvaluationRepositoryImpl
54
import javax.inject.Inject
65

7-
class FetchAppMicrogUserEvaluationUseCase @Inject constructor() {
6+
class FetchAppBareAospSecureEvaluationUseCase @Inject constructor() {
87

98
@Inject
109
lateinit var evaluationRepository: EvaluationRepository
1110

1211
suspend operator fun invoke(packageName: String): Evaluation? {
13-
return evaluationRepository.fetchMicrogUserEvaluation(packageName)
12+
return evaluationRepository.fetchBareAospSecureEvaluation(packageName)
1413
}
1514
}
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
package com.klee.sapio.domain
22

33
import com.klee.sapio.data.Evaluation
4-
import com.klee.sapio.data.EvaluationRepositoryImpl
54
import javax.inject.Inject
65

7-
class FetchAppBareAospUserEvaluationUseCase @Inject constructor() {
6+
class FetchAppMicrogRiskyEvaluationUseCase @Inject constructor() {
87

98
@Inject
109
lateinit var evaluationRepository: EvaluationRepository
1110

1211
suspend operator fun invoke(packageName: String): Evaluation? {
13-
return evaluationRepository.fetchBareAospUserEvaluation(packageName)
12+
return evaluationRepository.fetchMicrogRiskyEvaluation(packageName)
1413
}
1514
}

0 commit comments

Comments
 (0)