forked from nextcloud/android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Interface to communicate from settings to privacy feature.
- Loading branch information
1 parent
daf6e8a
commit 312027a
Showing
3 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
app/src/main/java/com/nmc/android/ui/PrivacySettingsInterface.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.nmc.android.ui | ||
|
||
import android.content.Context | ||
|
||
/** | ||
* interface to open privacy settings activity from nmc/1921-settings branch | ||
* for implementation look nmc/1878-privacy branch | ||
* this class will have the declaration for it since it has the PrivacySettingsActivity.java in place | ||
* since we don't have privacy settings functionality in this branch so to handle the redirection we have used interface | ||
*/ | ||
interface PrivacySettingsInterface { | ||
fun openPrivacySettingsActivity(context: Context) | ||
} |
14 changes: 14 additions & 0 deletions
14
app/src/main/java/com/nmc/android/ui/PrivacySettingsInterfaceImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.nmc.android.ui | ||
|
||
import android.content.Context | ||
|
||
/** | ||
* interface impl to launch PrivacySettings Activity | ||
* this class will have the implementation for it since it has the PrivacySettingsActivity in place | ||
* calling of this method will be done from nmc/1921-settings | ||
*/ | ||
class PrivacySettingsInterfaceImpl : PrivacySettingsInterface { | ||
override fun openPrivacySettingsActivity(context: Context) { | ||
PrivacySettingsActivity.openPrivacySettingsActivity(context, false) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters