-
Notifications
You must be signed in to change notification settings - Fork 8.3k
[Permissions] Move logic form module to service #5186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Permissions] Move logic form module to service #5186
Conversation
packages/expo-permissions/android/src/main/java/expo/modules/permissions/PermissionsModule.kt
Outdated
Show resolved
Hide resolved
packages/expo-permissions/android/src/main/java/expo/modules/permissions/PermissionsService.kt
Show resolved
Hide resolved
046f9a4
to
c11218b
Compare
...sions/android/src/main/java/expo/modules/permissions/requesters/SystemBrightnessRequester.kt
Outdated
Show resolved
Hide resolved
...sions/android/src/main/java/expo/modules/permissions/requesters/SystemBrightnessRequester.kt
Outdated
Show resolved
Hide resolved
public interface Permissions { | ||
|
||
Bundle getPermissionsBundle(String[] permissionTypes); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started to wonder why are we using String[]
instead of List<String>
here, in the whole interface? I guess we have some conversion from List
at the beginning (as RN provides us with sth List
-like) and vice-verse and the end we probably convert to List
-like again. Maybe we can get rid of these arrays in favour of List
-like interfaces? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Later, I will try to get rid of strings arrays.
packages/expo-permissions/android/src/main/java/expo/modules/permissions/PermissionsService.kt
Show resolved
Hide resolved
packages/expo-permissions/android/src/main/java/expo/modules/permissions/PermissionsService.kt
Show resolved
Hide resolved
packages/expo-permissions/android/src/main/java/expo/modules/permissions/PermissionsService.kt
Show resolved
Hide resolved
packages/expo-permissions/android/src/main/java/expo/modules/permissions/PermissionsService.kt
Show resolved
Hide resolved
packages/expo-permissions/android/src/main/java/expo/modules/permissions/PermissionsService.kt
Show resolved
Hide resolved
packages/expo-permissions/android/src/main/java/expo/modules/permissions/PermissionsService.kt
Show resolved
Hide resolved
* Move logic form module to service * Remove static var from PermissionsService * Make getPermission not throwable * Store asked permissions
* Move logic form module to service * Remove static var from PermissionsService * Make getPermission not throwable * Store asked permissions
* Move logic form module to service * Remove static var from PermissionsService * Make getPermission not throwable * Store asked permissions
* Move logic form module to service * Remove static var from PermissionsService * Make getPermission not throwable * Store asked permissions
* Move logic form module to service * Remove static var from PermissionsService * Make getPermission not throwable * Store asked permissions
* Move logic form module to service * Remove static var from PermissionsService * Make getPermission not throwable * Store asked permissions
* Move logic form module to service * Remove static var from PermissionsService * Make getPermission not throwable * Store asked permissions
* Move logic form module to service * Remove static var from PermissionsService * Make getPermission not throwable * Store asked permissions
* Move logic form module to service * Remove static var from PermissionsService * Make getPermission not throwable * Store asked permissions
* [Permissions] Extract base class for requester * [Permissions] Refactor * [Permissions] Make podspecs for each requester * [Permissions] Add missing self ensurement to requesters * [Permissions] Android fix * [Permissions] Rewrite module to kotlin * [Permissions] Move scoped ask to activity * [Permissions] Remove permissions manager * [Permissions] Remove PermissionsServiceBinding * [Permissions] Make requesters * [Permissions] Improve code styling * [Permissions] Make SystemBrightnessRequester (#5147) * Make SystemBrightnessRequester * Make type enum Co-Authored-By: Bartłomiej Bukowski <bartlomiejbukowski.b@gmail.com> * [Permissions] Rewrite android native api (#5186) * Move logic form module to service * Remove static var from PermissionsService * Make getPermission not throwable * Store asked permissions * [Permissions] Make requester registrable (#5187) * Clean iOS * Fix scoped permissions status (never undetermined) * Requesters belong to EXPermission * Remove permissions delegate * Make requester registrable * [Permissions] Small fixes * [Permissions] Add app ownership check and fix code style * [Permissions] Rework native api (#5418) * [Permissions] Move requesters to modules on iOS * [Permissions] Add bool granted * [Permissions] Add to native modules, permissions related methods * [Permissions] Repair CI * [Permissions] Fix typo * [Permissions] Reduce boilerplate code * [Permissions] Fix error description * [Permissions] Export constants for permissions status * [Permissions] Rename methods wrapper * [Permissions] Remove scoped permissions from standalone apps * [Permissions] Fix lateinit and scoped permissions Location module in OnHostResume calls getPermissions method before Activity Provider is available. * [Permissions] Add `never ask again` support * [Permissions] Scoping only dangerous permission * [Permissions] Rename `neverAskAgain` to `canAskAgain` * [Permissions] Run pod install * [Permissions] Update docs * [Permissions] Fix CI * [Permissions] Fix typo and imports after rebase * [Permissions] Small improvements in Android * [Permissions] Make test-suits pass * [Permissions] Add requested changes * [Permissions] Move ts types to unimodule * [Permissions] Add missing requester * [Permissions] Small fixes * [Permissions] Fix after rebase * [Permissions] Update docs * [Permissions] Publish dev home * [Permissions] Add kotlin dependency to build.gradle * [Permissions] Fix permissions in ContactsModule * [Permissions] Set manifest in HomeActivity class * [Permissions] Regenerate pods projects
* [Permissions] Extract base class for requester * [Permissions] Refactor * [Permissions] Make podspecs for each requester * [Permissions] Add missing self ensurement to requesters * [Permissions] Android fix * [Permissions] Rewrite module to kotlin * [Permissions] Move scoped ask to activity * [Permissions] Remove permissions manager * [Permissions] Remove PermissionsServiceBinding * [Permissions] Make requesters * [Permissions] Improve code styling * [Permissions] Make SystemBrightnessRequester (expo#5147) * Make SystemBrightnessRequester * Make type enum Co-Authored-By: Bartłomiej Bukowski <bartlomiejbukowski.b@gmail.com> * [Permissions] Rewrite android native api (expo#5186) * Move logic form module to service * Remove static var from PermissionsService * Make getPermission not throwable * Store asked permissions * [Permissions] Make requester registrable (expo#5187) * Clean iOS * Fix scoped permissions status (never undetermined) * Requesters belong to EXPermission * Remove permissions delegate * Make requester registrable * [Permissions] Small fixes * [Permissions] Add app ownership check and fix code style * [Permissions] Rework native api (expo#5418) * [Permissions] Move requesters to modules on iOS * [Permissions] Add bool granted * [Permissions] Add to native modules, permissions related methods * [Permissions] Repair CI * [Permissions] Fix typo * [Permissions] Reduce boilerplate code * [Permissions] Fix error description * [Permissions] Export constants for permissions status * [Permissions] Rename methods wrapper * [Permissions] Remove scoped permissions from standalone apps * [Permissions] Fix lateinit and scoped permissions Location module in OnHostResume calls getPermissions method before Activity Provider is available. * [Permissions] Add `never ask again` support * [Permissions] Scoping only dangerous permission * [Permissions] Rename `neverAskAgain` to `canAskAgain` * [Permissions] Run pod install * [Permissions] Update docs * [Permissions] Fix CI * [Permissions] Fix typo and imports after rebase * [Permissions] Small improvements in Android * [Permissions] Make test-suits pass * [Permissions] Add requested changes * [Permissions] Move ts types to unimodule * [Permissions] Add missing requester * [Permissions] Small fixes * [Permissions] Fix after rebase * [Permissions] Update docs * [Permissions] Publish dev home * [Permissions] Add kotlin dependency to build.gradle * [Permissions] Fix permissions in ContactsModule * [Permissions] Set manifest in HomeActivity class * [Permissions] Regenerate pods projects
* [Permissions] Extract base class for requester * [Permissions] Refactor * [Permissions] Make podspecs for each requester * [Permissions] Add missing self ensurement to requesters * [Permissions] Android fix * [Permissions] Rewrite module to kotlin * [Permissions] Move scoped ask to activity * [Permissions] Remove permissions manager * [Permissions] Remove PermissionsServiceBinding * [Permissions] Make requesters * [Permissions] Improve code styling * [Permissions] Make SystemBrightnessRequester (expo#5147) * Make SystemBrightnessRequester * Make type enum Co-Authored-By: Bartłomiej Bukowski <bartlomiejbukowski.b@gmail.com> * [Permissions] Rewrite android native api (expo#5186) * Move logic form module to service * Remove static var from PermissionsService * Make getPermission not throwable * Store asked permissions * [Permissions] Make requester registrable (expo#5187) * Clean iOS * Fix scoped permissions status (never undetermined) * Requesters belong to EXPermission * Remove permissions delegate * Make requester registrable * [Permissions] Small fixes * [Permissions] Add app ownership check and fix code style * [Permissions] Rework native api (expo#5418) * [Permissions] Move requesters to modules on iOS * [Permissions] Add bool granted * [Permissions] Add to native modules, permissions related methods * [Permissions] Repair CI * [Permissions] Fix typo * [Permissions] Reduce boilerplate code * [Permissions] Fix error description * [Permissions] Export constants for permissions status * [Permissions] Rename methods wrapper * [Permissions] Remove scoped permissions from standalone apps * [Permissions] Fix lateinit and scoped permissions Location module in OnHostResume calls getPermissions method before Activity Provider is available. * [Permissions] Add `never ask again` support * [Permissions] Scoping only dangerous permission * [Permissions] Rename `neverAskAgain` to `canAskAgain` * [Permissions] Run pod install * [Permissions] Update docs * [Permissions] Fix CI * [Permissions] Fix typo and imports after rebase * [Permissions] Small improvements in Android * [Permissions] Make test-suits pass * [Permissions] Add requested changes * [Permissions] Move ts types to unimodule * [Permissions] Add missing requester * [Permissions] Small fixes * [Permissions] Fix after rebase * [Permissions] Update docs * [Permissions] Publish dev home * [Permissions] Add kotlin dependency to build.gradle * [Permissions] Fix permissions in ContactsModule * [Permissions] Set manifest in HomeActivity class * [Permissions] Regenerate pods projects
* [Permissions] Extract base class for requester * [Permissions] Refactor * [Permissions] Make podspecs for each requester * [Permissions] Add missing self ensurement to requesters * [Permissions] Android fix * [Permissions] Rewrite module to kotlin * [Permissions] Move scoped ask to activity * [Permissions] Remove permissions manager * [Permissions] Remove PermissionsServiceBinding * [Permissions] Make requesters * [Permissions] Improve code styling * [Permissions] Make SystemBrightnessRequester (expo#5147) * Make SystemBrightnessRequester * Make type enum Co-Authored-By: Bartłomiej Bukowski <bartlomiejbukowski.b@gmail.com> * [Permissions] Rewrite android native api (expo#5186) * Move logic form module to service * Remove static var from PermissionsService * Make getPermission not throwable * Store asked permissions * [Permissions] Make requester registrable (expo#5187) * Clean iOS * Fix scoped permissions status (never undetermined) * Requesters belong to EXPermission * Remove permissions delegate * Make requester registrable * [Permissions] Small fixes * [Permissions] Add app ownership check and fix code style * [Permissions] Rework native api (expo#5418) * [Permissions] Move requesters to modules on iOS * [Permissions] Add bool granted * [Permissions] Add to native modules, permissions related methods * [Permissions] Repair CI * [Permissions] Fix typo * [Permissions] Reduce boilerplate code * [Permissions] Fix error description * [Permissions] Export constants for permissions status * [Permissions] Rename methods wrapper * [Permissions] Remove scoped permissions from standalone apps * [Permissions] Fix lateinit and scoped permissions Location module in OnHostResume calls getPermissions method before Activity Provider is available. * [Permissions] Add `never ask again` support * [Permissions] Scoping only dangerous permission * [Permissions] Rename `neverAskAgain` to `canAskAgain` * [Permissions] Run pod install * [Permissions] Update docs * [Permissions] Fix CI * [Permissions] Fix typo and imports after rebase * [Permissions] Small improvements in Android * [Permissions] Make test-suits pass * [Permissions] Add requested changes * [Permissions] Move ts types to unimodule * [Permissions] Add missing requester * [Permissions] Small fixes * [Permissions] Fix after rebase * [Permissions] Update docs * [Permissions] Publish dev home * [Permissions] Add kotlin dependency to build.gradle * [Permissions] Fix permissions in ContactsModule * [Permissions] Set manifest in HomeActivity class * [Permissions] Regenerate pods projects
* [Permissions] Extract base class for requester * [Permissions] Refactor * [Permissions] Make podspecs for each requester * [Permissions] Add missing self ensurement to requesters * [Permissions] Android fix * [Permissions] Rewrite module to kotlin * [Permissions] Move scoped ask to activity * [Permissions] Remove permissions manager * [Permissions] Remove PermissionsServiceBinding * [Permissions] Make requesters * [Permissions] Improve code styling * [Permissions] Make SystemBrightnessRequester (expo#5147) * Make SystemBrightnessRequester * Make type enum Co-Authored-By: Bartłomiej Bukowski <bartlomiejbukowski.b@gmail.com> * [Permissions] Rewrite android native api (expo#5186) * Move logic form module to service * Remove static var from PermissionsService * Make getPermission not throwable * Store asked permissions * [Permissions] Make requester registrable (expo#5187) * Clean iOS * Fix scoped permissions status (never undetermined) * Requesters belong to EXPermission * Remove permissions delegate * Make requester registrable * [Permissions] Small fixes * [Permissions] Add app ownership check and fix code style * [Permissions] Rework native api (expo#5418) * [Permissions] Move requesters to modules on iOS * [Permissions] Add bool granted * [Permissions] Add to native modules, permissions related methods * [Permissions] Repair CI * [Permissions] Fix typo * [Permissions] Reduce boilerplate code * [Permissions] Fix error description * [Permissions] Export constants for permissions status * [Permissions] Rename methods wrapper * [Permissions] Remove scoped permissions from standalone apps * [Permissions] Fix lateinit and scoped permissions Location module in OnHostResume calls getPermissions method before Activity Provider is available. * [Permissions] Add `never ask again` support * [Permissions] Scoping only dangerous permission * [Permissions] Rename `neverAskAgain` to `canAskAgain` * [Permissions] Run pod install * [Permissions] Update docs * [Permissions] Fix CI * [Permissions] Fix typo and imports after rebase * [Permissions] Small improvements in Android * [Permissions] Make test-suits pass * [Permissions] Add requested changes * [Permissions] Move ts types to unimodule * [Permissions] Add missing requester * [Permissions] Small fixes * [Permissions] Fix after rebase * [Permissions] Update docs * [Permissions] Publish dev home * [Permissions] Add kotlin dependency to build.gradle * [Permissions] Fix permissions in ContactsModule * [Permissions] Set manifest in HomeActivity class * [Permissions] Regenerate pods projects
Why
Part of #5061.