From daf6e8a591bdb045db980d906ac2f1954e3de8a5 Mon Sep 17 00:00:00 2001 From: A117870935 Date: Wed, 17 May 2023 15:57:37 +0530 Subject: [PATCH] Code refactoring. --- app/src/main/AndroidManifest.xml | 20 ++-- .../android/ui/activity/SettingsActivity.java | 84 +---------------- app/src/main/res/values-de/strings.xml | 12 ++- app/src/main/res/values-night/colors.xml | 77 +++++++++++++--- app/src/main/res/values/colors.xml | 91 ++++++++++++++++--- app/src/main/res/values/dimens.xml | 2 +- app/src/main/res/values/strings.xml | 47 +++++----- app/src/main/res/xml/preferences.xml | 35 +++---- 8 files changed, 200 insertions(+), 168 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 98b68f343bdf..9ccecfadd944 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -222,17 +222,6 @@ android:name=".ui.preview.PreviewImageActivity" android:exported="false" android:theme="@style/Theme.ownCloud.Overlay" /> - - - - - @@ -497,6 +486,15 @@ android:name=".ui.preview.PreviewBitmapActivity" android:exported="false" android:theme="@style/Theme.ownCloud.OverlayGrey" /> + + + { - PrivacySettingsActivity.openPrivacySettingsActivity(this, false); - return true; - }); - } - - // privacy policy - Preference privacyPolicyPreference = findPreference("privacy_policy"); - - if (privacyPolicyPreference != null) { - //privacyPolicyPreference.setTitle(ThemeUtils.getColoredTitle(getString(R.string.privacy_policy), - // accentColor)); - if (URLUtil.isValidUrl(getString(R.string.privacy_url))) { - privacyPolicyPreference.setOnPreferenceClickListener(preference -> { - try { - Uri privacyUrl = Uri.parse(getString(R.string.privacy_url)); - String mimeType = MimeTypeUtil.getBestMimeTypeByFilename(privacyUrl.getLastPathSegment()); - - Intent intent; - if ("application/pdf".equals(mimeType)) { - intent = new Intent(Intent.ACTION_VIEW, privacyUrl); - DisplayUtils.startIntentIfAppAvailable(intent, this, R.string.no_pdf_app_available); - } else { - intent = new Intent(getApplicationContext(), ExternalSiteWebView.class); - intent.putExtra(ExternalSiteWebView.EXTRA_TITLE, - getResources().getString(R.string.privacy_policy)); - intent.putExtra(ExternalSiteWebView.EXTRA_URL, privacyUrl.toString()); - intent.putExtra(ExternalSiteWebView.EXTRA_SHOW_SIDEBAR, false); - intent.putExtra(ExternalSiteWebView.EXTRA_MENU_ITEM_ID, -1); - } - - startActivity(intent); - } catch (Exception e) { - Log_OC.e(TAG, "Could not parse privacy policy url"); - preferenceCategoryAbout.removePreference(privacyPolicyPreference); - } - return true; - }); - } else { - preferenceCategoryAbout.removePreference(privacyPolicyPreference); - } - } - - // source code - Preference sourcecodePreference = findPreference("sourcecode"); - if (sourcecodePreference != null) { - // sourcecodePreference.setTitle(ThemeUtils.getColoredTitle(getString(R.string.prefs_open_source), - // accentColor)); - if (URLUtil.isValidUrl(getString(R.string.sourcecode_url))) { - sourcecodePreference.setOnPreferenceClickListener(preference -> { - Intent intent = new Intent(getApplicationContext(), ExternalSiteWebView.class); - intent.putExtra(ExternalSiteWebView.EXTRA_TITLE, - getResources().getString(R.string.prefs_open_source)); - intent.putExtra(ExternalSiteWebView.EXTRA_URL, getResources().getString(R.string.sourcecode_url)); - intent.putExtra(ExternalSiteWebView.EXTRA_SHOW_SIDEBAR, false); - intent.putExtra(ExternalSiteWebView.EXTRA_MENU_ITEM_ID, -1); - startActivity(intent); - return true; - }); - } else { - preferenceCategoryAbout.removePreference(sourcecodePreference); - } - } - } - private void setupMoreCategory() { final PreferenceCategory preferenceCategoryMore = (PreferenceCategory) findPreference("more"); viewThemeUtils.files.themePreferenceCategory(preferenceCategoryMore); diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index cfb098b8214f..2c6fe665c8ed 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -598,10 +598,6 @@ Systemvorgaben verwenden - Datenschutz - Datenschutz - Datenschutzbestimmungen - Verwendete OpenSource Software Zur Optimierung unserer App erfassen wir anonymisierte Daten. Hierzu nutzen wir Software Lösungen verschiedener Partner. Wir möchten Ihnen volle Transparenz und Entscheidungsgewalt über die Verarbeitung und Erfassung Ihrer anonymisierten Nutzungsdaten geben. Ihre Einstellungen können Sie auch später jederzeit in den Einstellungen unter Datenschutz ändern. Bitte beachten Sie jedoch, dass die Datenerfassungen einen erheblichen Beitrag zur Optimierung dieser App leisten und Sie diese Optimierungen durch die Unterbindung der Datenübermittlung verhindern. Erfoderliche Datenerfassung Die Erfassung dieser Daten ist notwendig, um wesentliche Funktionen der App nutzen zu können. @@ -879,6 +875,14 @@ Diese Datei kann nicht hochgeladen werden Keine Datei zum Hochladen Ordnername + Kontoinformationen + Datenschutz + Datenschutz + Datenschutzbestimmungen + Verwendete OpenSource Software + Info + Bedienung + Die Ende-zu-Ende Verschlüsselung wurde bereits auf einem anderen Gerät eingerichtet. Bitte geben Sie Ihre Passphrase ein, damit die Dateien synchronisiert und entschlüsselt werden. Hochladeordner auswählen Konnte %1$s nicht hochladen Hochladen fehlgeschlagen, bitte erneut anmelden diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index 8e3425aefd14..88a29668c4cd 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -24,7 +24,6 @@ #000000 #ff6F6F6F #A5A5A5 - @color/grey_70 #222222 @@ -35,16 +34,6 @@ #222222 #ffffff - - @color/grey_70 - @color/grey_60 - @color/grey_70 - @color/grey_60 - - - @color/grey_70 - @color/grey_70 - @color/appbar #373535 @@ -59,4 +48,70 @@ #1E1E1E @android:color/white + + + #FFFFFF + @color/grey_30 + @color/grey_30 + #CCCCCC + @color/grey_70 + @color/grey_80 + #2D2D2D + @color/grey_70 + @color/grey_70 + + + @color/grey_80 + @color/grey_0 + + + @color/grey_80 + @color/grey_0 + + + @color/grey_60 + @color/grey_0 + @color/grey_0 + @color/grey_30 + #FFFFFF + @color/grey_30 + @color/grey_80 + #FFFFFF + + + @color/grey_80 + @color/grey_30 + @color/grey_0 + + + @color/grey_80 + @color/grey_0 + @color/grey_80 + + + @color/grey_70 + @color/grey_60 + @color/grey_70 + @color/grey_60 + + + @color/grey_70 + @color/grey_70 + + + #FFFFFF + @color/grey_30 + @color/grey_0 + @color/grey_0 + @color/grey_0 + @color/grey_0 + @color/grey_60 + @color/grey_0 + #FFFFFF + + + #121212 + @color/grey_0 + @color/grey_80 + @color/grey_80 diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index b9030f14d855..1ddf1a93ca08 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -32,19 +32,11 @@ #EEEEEE #00000000 #666666 - @color/grey_30 #e53935 #757575 #222222 - #101010 - #F2F2F2 - #E5E5E5 - #B2B2B2 - #666666 - #4C4C4C - #333333 #EEEEEE #BDBDBD #666666 @@ -85,6 +77,62 @@ #616161 #80000000 + + @android:color/white + #666666 + #A5A5A5 + + + #191919 + @color/primary + #191919 + #191919 + @color/grey_30 + @android:color/white + #FFFFFF + @color/grey_0 + #CCCCCC + #77c4ff + #B3FFFFFF + @color/grey_10 + + + #101010 + #F2F2F2 + #E5E5E5 + #B2B2B2 + #666666 + #4C4C4C + #333333 + + + @color/design_snackbar_background_color + @color/white + + + #FFFFFF + #191919 + + + @color/grey_0 + #191919 + @color/primary + #191919 + @color/primary + @color/grey_30 + @color/white + #191919 + + + #FFFFFF + #191919 + #191919 + + + #FFFFFF + #191919 + #FFFFFF + @color/primary #F399C7 @@ -101,8 +149,27 @@ @color/grey_30 #CCCCCC - - @android:color/white - #666666 - #A5A5A5 + + #191919 + @color/grey_30 + #191919 + #191919 + #191919 + #191919 + @color/grey_30 + #191919 + #000000 + #191919 + #F6E5EB + #C16F81 + #0D39DF + #0099ff + + + @color/grey_0 + #191919 + @color/grey_0 + @color/grey_30 + #77b6bb + #5077b6bb diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index d976f96e19d6..7c23544141a7 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -31,4 +31,4 @@ 145dp 1dp 13sp - + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 95ee8aa451b1..84664739f6bb 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -60,32 +60,6 @@ Follow system Theme - - Data Privacy - Privacy Settings - Privacy Policy - Used OpenSource Software - To optimize your app, we collect anonymous data. For this we use - software solutions of different partners. We would like to give you full transparency and decision-making power over the processing and collection of your anonymized usage data. You can also change your settings at any time later in the app settings under data protection. Please note, however, that data collection makes a considerable contribution to the optimization of this app and you prevent this optimization by preventing data transmission. - Required data collection - The collection of this data is necessary to be able to use essential - functions of the app. - Analysis-data acquisition for the design - This data helps us to optimize the app usage for you and to identify system crashes and errors more quickly. - This app uses Cookies and similar technologies (tools). By - clicking Accept, you accept the processing and also the Transfer of your data to third parties. The data will - be used for Analysis, retargeting and to Display personalized Content and Advertising on sites and - third-party sites. You can find further information, including Information on data processing by third-party - Providers, in the Settings and in our %s. You can %s the use of the Tools or customize them at any time in the - %s. - Privacy Settings - Accept - Save Settings - Privacy Policy - reject - Settings - - Try %1$s on your device! I want to invite you to use %1$s on your device.\nDownload here: %2$s %1$s or %2$s @@ -220,6 +194,27 @@ Created %1$d fresh UID Created %1$d fresh UIDs + + To optimize your app, we collect anonymous data. For this we use + software solutions of different partners. We would like to give you full transparency and decision-making power over the processing and collection of your anonymized usage data. You can also change your settings at any time later in the app settings under data protection. Please note, however, that data collection makes a considerable contribution to the optimization of this app and you prevent this optimization by preventing data transmission. + Required data collection + The collection of this data is necessary to be able to use essential + functions of the app. + Analysis-data acquisition for the design + This data helps us to optimize the app usage for you and to identify system crashes and errors more quickly. + This app uses Cookies and similar technologies (tools). By + clicking Accept, you accept the processing and also the Transfer of your data to third parties. The data will + be used for Analysis, retargeting and to Display personalized Content and Advertising on sites and + third-party sites. You can find further information, including Information on data processing by third-party + Providers, in the Settings and in our %s. You can %s the use of the Tools or customize them at any time in the + %s. + Privacy Settings + Accept + Save Settings + Privacy Policy + reject + Settings + Processed %d entry. Processed %d entries. diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index f15a5318bda1..f68a65dd1fa7 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -104,26 +104,21 @@ android:title="@string/prefs_imprint" android:key="imprint" /> - - - - - - + + + + + +