|
55 | 55 | import com.nextcloud.client.etm.EtmActivity; |
56 | 56 | import com.nextcloud.client.logger.ui.LogsActivity; |
57 | 57 | import com.nextcloud.client.network.ClientFactory; |
| 58 | +import com.nmc.android.ui.PrivacySettingsInterface; |
58 | 59 | import com.nextcloud.client.preferences.AppPreferences; |
59 | 60 | import com.nextcloud.client.preferences.AppPreferencesImpl; |
60 | 61 | import com.owncloud.android.BuildConfig; |
61 | 62 | import com.owncloud.android.MainApp; |
62 | 63 | import com.owncloud.android.R; |
63 | | -import com.nmc.android.ui.PrivacySettingsActivity; |
64 | 64 | import com.owncloud.android.authentication.AuthenticatorActivity; |
65 | 65 | import com.owncloud.android.datamodel.ArbitraryDataProvider; |
66 | 66 | import com.owncloud.android.datamodel.ArbitraryDataProviderImpl; |
@@ -149,6 +149,16 @@ public class SettingsActivity extends PreferenceActivity |
149 | 149 | @Inject ClientFactory clientFactory; |
150 | 150 | @Inject ViewThemeUtils viewThemeUtils; |
151 | 151 |
|
| 152 | + /** |
| 153 | + * Things to note about both the branches. |
| 154 | + * 1. nmc/1921-settings branch: |
| 155 | + * --> interface won't be initialised |
| 156 | + * --> calling of interface method will be done here |
| 157 | + * 2. nmc/1878-privacy |
| 158 | + * --> interface will be initialised |
| 159 | + * --> calling of interface method won't be done here |
| 160 | + */ |
| 161 | + private PrivacySettingsInterface privacySettingsInterface; |
152 | 162 |
|
153 | 163 | @SuppressWarnings("deprecation") |
154 | 164 | @Override |
@@ -352,11 +362,10 @@ private void setupDataPrivacyCategory(int titleColor) { |
352 | 362 | privacySettingPreference.setTitle(StringUtils.getColorSpan(getString(R.string.privacy_settings), |
353 | 363 | titleColor)); |
354 | 364 | privacySettingPreference.setOnPreferenceClickListener(preference -> { |
355 | | - //Compile time error will be shown here while running build from here |
356 | | - //look for nmc/1878-privacy for the PrivacySettingsActivity. |
357 | | - //this is workaround to avoid code conflict of settings and privacy |
358 | | - // TODO: 05/17/23 find a way to have the redirection in privacy branch. |
359 | | - PrivacySettingsActivity.openPrivacySettingsActivity(this, false); |
| 365 | + //implementation and logic will be available in nmc/1878-privacy |
| 366 | + if (privacySettingsInterface != null) { |
| 367 | + privacySettingsInterface.openPrivacySettingsActivity(SettingsActivity.this); |
| 368 | + } |
360 | 369 | return true; |
361 | 370 | }); |
362 | 371 | } |
|
0 commit comments