Skip to content

Commit

Permalink
Merge pull request #591 from ooni/issue/1989-update
Browse files Browse the repository at this point in the history
Fix: Inconsistent behavior opening preference intent screens.
  • Loading branch information
aanorbel authored Sep 10, 2023
2 parents 41eb5f5 + 7e0b657 commit 907aa0d
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 18 deletions.
3 changes: 3 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ android {
testInstrumentationRunner "org.openobservatory.ooniprobe.TestAndroidJUnitRunner"
buildConfigField 'String', 'OONI_API_BASE_URL', '"https://api.ooni.io/"'
buildConfigField 'String', 'NOTIFICATION_SERVER', '"https://countly.ooni.io"'
resValue "string", "APP_ID", 'org.openobservatory.ooniprobe'
resValue "string", "APP_NAME", "OONI Probe"
buildConfigField 'String', 'SOFTWARE_NAME', 'BASE_SOFTWARE_NAME+IS_DEBUG'
buildConfigField 'String', 'COUNTLY_KEY', '"146836f41172f9e3287cab6f2cc347de3f5ddf3b"'
Expand Down Expand Up @@ -65,6 +66,7 @@ android {
versionNameSuffix "-beta.1"
versionCode versionCodeDate()
buildConfigField 'String', 'BASE_SOFTWARE_NAME', '"ooniprobe-android-dev"'
resValue "string", "APP_ID", 'org.openobservatory.ooniprobe.dev'
resValue "string", "APP_NAME", "OONI Dev"
buildConfigField 'String', 'COUNTLY_KEY', '"e6c2cfe53e85951d50567467cef3f9fa2eab32c3"'
}
Expand All @@ -74,6 +76,7 @@ android {
versionNameSuffix "-experimental.1"
versionCode versionCodeDate()
buildConfigField 'String', 'BASE_SOFTWARE_NAME', '"ooniprobe-android-experimental"'
resValue "string", "APP_ID", 'org.openobservatory.ooniprobe.experimental'
resValue "string", "APP_NAME", "OONI Exp"
buildConfigField 'String', 'COUNTLY_KEY', '"e6c2cfe53e85951d50567467cef3f9fa2eab32c3"'
}
Expand Down
6 changes: 0 additions & 6 deletions app/src/dev/res/values/untranslatable.xml

This file was deleted.

6 changes: 0 additions & 6 deletions app/src/experimental/res/values/untranslatable.xml

This file was deleted.

12 changes: 9 additions & 3 deletions app/src/fdroid/res/xml/preferences_global.xml
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,9 @@
app:iconSpaceReserved="false"
android:key="logs"
android:title="@string/Settings_Advanced_RecentLogs">
<intent android:action="@string/preference_intent_log_activity" />
<intent
android:targetPackage="@string/APP_ID"
android:targetClass="@string/preference_intent_log_activity"/>
</PreferenceScreen>
<SwitchPreferenceCompat
android:defaultValue="false"
Expand All @@ -378,7 +380,9 @@
android:icon="@drawable/proxy"
android:key="@string/ooni_backend_proxy"
android:title="@string/Settings_Proxy_Label">
<intent android:action="@string/preference_intent_proxy_activity" />
<intent
android:targetPackage="@string/APP_ID"
android:targetClass="@string/preference_intent_proxy_activity"/>
</PreferenceScreen>
<PreferenceScreen
android:icon="@drawable/send_email"
Expand All @@ -388,6 +392,8 @@
android:icon="@drawable/about_ooni"
android:key="@string/about_ooni"
android:title="@string/Settings_About_Label">
<intent android:action="@string/preference_intent_about_ooni" />
<intent
android:targetPackage="@string/APP_ID"
android:targetClass="@string/preference_intent_about_ooni" />
</PreferenceScreen>
</PreferenceScreen>
12 changes: 9 additions & 3 deletions app/src/main/res/xml/preferences_global.xml
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,9 @@
android:icon="@drawable/proxy"
android:key="@string/ooni_backend_proxy"
android:title="@string/Settings_Proxy_Label">
<intent android:action="@string/preference_intent_proxy_activity" />
<intent
android:targetPackage="@string/APP_ID"
android:targetClass="@string/preference_intent_proxy_activity"/>
</PreferenceScreen>
<PreferenceScreen
android:icon="@drawable/advanced"
Expand All @@ -373,7 +375,9 @@
app:iconSpaceReserved="false"
android:key="logs"
android:title="@string/Settings_Advanced_RecentLogs">
<intent android:action="@string/preference_intent_log_activity" />
<intent
android:targetPackage="@string/APP_ID"
android:targetClass="@string/preference_intent_log_activity"/>
</PreferenceScreen>
<SwitchPreferenceCompat
android:defaultValue="false"
Expand All @@ -400,6 +404,8 @@
android:icon="@drawable/about_ooni"
android:key="@string/about_ooni"
android:title="@string/Settings_About_Label">
<intent android:action="@string/preference_intent_about_ooni" />
<intent
android:targetPackage="@string/APP_ID"
android:targetClass="@string/preference_intent_about_ooni" />
</PreferenceScreen>
</PreferenceScreen>

0 comments on commit 907aa0d

Please sign in to comment.