File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
app/src/main/java/com/ismartcoding/plain Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ enum class Permission {
6969
7070 suspend fun isEnabledAsync (context : Context ): Boolean {
7171 val apiPermissions = ApiPermissionsPreference .getAsync(context)
72- return apiPermissions.contains(this .toString() )
72+ return apiPermissions.contains(name )
7373 }
7474
7575 fun toSysPermission (): String {
Original file line number Diff line number Diff line change @@ -337,7 +337,7 @@ class MainGraphQL(val schema: Schema) {
337337 query(" contactCount" ) {
338338 resolver { query: String ->
339339 val context = MainApp .instance
340- if (Permission .READ_CONTACTS .enabledAndCanAsync(context)) {
340+ if (Permission .WRITE_CONTACTS .enabledAndCanAsync(context)) {
341341 ContactMediaStoreHelper .countAsync(context, query)
342342 } else {
343343 0
@@ -381,7 +381,7 @@ class MainGraphQL(val schema: Schema) {
381381 query(" callCount" ) {
382382 resolver { query: String ->
383383 val context = MainApp .instance
384- if (Permission .READ_CALL_LOG .enabledAndCanAsync(context)) {
384+ if (Permission .WRITE_CALL_LOG .enabledAndCanAsync(context)) {
385385 CallMediaStoreHelper .countAsync(context, query)
386386 } else {
387387 0
You can’t perform that action at this time.
0 commit comments