code formatting

This commit is contained in:
Hans-Christoph Steiner 2021-02-25 09:36:53 +01:00
parent a34216e39f
commit fa827e4edb
3 changed files with 29 additions and 28 deletions

View File

@ -458,32 +458,32 @@ public class PreferencesFragment extends PreferenceFragmentCompat
private final Preference.OnPreferenceChangeListener useTorChangedListener =
new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object enabled) {
if ((Boolean) enabled) {
enableProxyCheckPref.setChecked(false);
final AppCompatActivity activity = (AppCompatActivity) getActivity();
if (!OrbotHelper.isOrbotInstalled(activity)) {
Intent intent = OrbotHelper.getOrbotInstallIntent(activity);
activity.startActivityForResult(intent, REQUEST_INSTALL_ORBOT);
@Override
public boolean onPreferenceChange(Preference preference, Object enabled) {
if ((Boolean) enabled) {
enableProxyCheckPref.setChecked(false);
final AppCompatActivity activity = (AppCompatActivity) getActivity();
if (!OrbotHelper.isOrbotInstalled(activity)) {
Intent intent = OrbotHelper.getOrbotInstallIntent(activity);
activity.startActivityForResult(intent, REQUEST_INSTALL_ORBOT);
}
// NetCipher gets configured to use Tor in onPause()
// via a call to FDroidApp.configureProxy()
}
return true;
}
// NetCipher gets configured to use Tor in onPause()
// via a call to FDroidApp.configureProxy()
}
return true;
}
};
};
private final Preference.OnPreferenceChangeListener proxyEnabledChangedListener =
new Preference.OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object enabled) {
if ((Boolean) enabled) {
useTorCheckPref.setChecked(false);
}
return true;
}
};
@Override
public boolean onPreferenceChange(Preference preference, Object enabled) {
if ((Boolean) enabled) {
useTorCheckPref.setChecked(false);
}
return true;
}
};
@Override
public void onResume() {

View File

@ -1,12 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/menu_share"
android:icon="@drawable/ic_share"
android:title="@string/menu_share"
app:showAsAction="ifRoom"/>
app:showAsAction="ifRoom" />
<item
android:id="@+id/menu_delete"
android:icon="@drawable/ic_delete"
android:title="@string/delete"/>
android:title="@string/delete" />
</menu>

View File

@ -659,9 +659,9 @@ This often occurs with apps installed via Google Play or other sources, if they
<string name="details_last_updated_today">Updated today</string>
<string name="warning_scaning_qr_code">Your camera doesn\'t seem to have an autofocus. It might be difficult to scan the code.</string>
<string name="undo">Undo</string>
<string name="app_list__dismiss_installing_app">Installation cancelled</string>
<plurals name="details_last_update_days">
<string name="undo">Undo</string>
<string name="app_list__dismiss_installing_app">Installation cancelled</string>
<plurals name="details_last_update_days">
<item quantity="one">Updated %1$d day ago</item>
<item quantity="other">Updated %1$d days ago</item>
</plurals>