Browse Source

Fix settings import/export to use document provider

pull/667/head
Eric Kok 10 months ago
parent
commit
25ba61e283
  1. 3
      app/src/main/java/org/transdroid/core/app/settings/SettingsPersistence.java
  2. 1
      app/src/main/java/org/transdroid/core/gui/DetailsActivity.java
  3. 14
      app/src/main/java/org/transdroid/core/gui/TorrentsActivity.java
  4. 18
      app/src/main/java/org/transdroid/core/gui/navigation/NavigationHelper.java
  5. 1
      app/src/main/java/org/transdroid/core/gui/rss/RssFeedsActivity.java
  6. 1
      app/src/main/java/org/transdroid/core/gui/rss/RssItemsActivity.java
  7. 1
      app/src/main/java/org/transdroid/core/gui/search/SearchActivity.java
  8. 3
      app/src/main/java/org/transdroid/core/gui/settings/HelpSettingsActivity.java
  9. 3
      app/src/main/java/org/transdroid/core/gui/settings/MainSettingsActivity.java
  10. 3
      app/src/main/java/org/transdroid/core/gui/settings/NotificationSettingsActivity.java
  11. 3
      app/src/main/java/org/transdroid/core/gui/settings/RssfeedSettingsActivity.java
  12. 4
      app/src/main/java/org/transdroid/core/gui/settings/ServerSettingsActivity.java
  13. 59
      app/src/main/java/org/transdroid/core/gui/settings/SystemSettingsActivity.java
  14. 3
      app/src/main/java/org/transdroid/core/gui/settings/WebsearchSettingsActivity.java
  15. 1
      app/src/main/java/org/transdroid/core/seedbox/DediseedboxSettingsActivity.java
  16. 1
      app/src/main/java/org/transdroid/core/seedbox/XirvikDediSettingsActivity.java
  17. 1
      app/src/main/java/org/transdroid/core/seedbox/XirvikSemiSettingsActivity.java
  18. 1
      app/src/main/java/org/transdroid/core/seedbox/XirvikSettingsActivity.java
  19. 1
      app/src/main/java/org/transdroid/core/widget/ListWidgetConfigActivity.java
  20. 1
      app/src/main/java/org/transdroid/core/widget/ListWidgetProvider.java
  21. 2
      app/src/main/java/org/transdroid/core/widget/ListWidgetViewsService.java
  22. 1
      app/src/main/java/org/transdroid/daemon/util/TlsSniSocketFactory.java
  23. 2
      app/src/main/res/values/strings.xml
  24. 2
      build.gradle
  25. 2
      gradle/wrapper/gradle-wrapper.properties

3
app/src/main/java/org/transdroid/core/app/settings/SettingsPersistence.java

@ -44,10 +44,7 @@ import java.io.OutputStream; @@ -44,10 +44,7 @@ import java.io.OutputStream;
@EBean(scope = Scope.Singleton)
public class SettingsPersistence {
public static final String DEFAULT_SETTINGS_DIR = Environment.getExternalStorageDirectory().toString()
+ "/Transdroid/";
public static final String DEFAULT_SETTINGS_FILENAME = "settings.json";
public static final File DEFAULT_SETTINGS_FILE = new File(DEFAULT_SETTINGS_DIR + DEFAULT_SETTINGS_FILENAME);
@Bean
protected ApplicationSettings applicationSettings;
@Bean

1
app/src/main/java/org/transdroid/core/gui/DetailsActivity.java

@ -141,7 +141,6 @@ public class DetailsActivity extends AppCompatActivity implements TorrentTasksEx @@ -141,7 +141,6 @@ public class DetailsActivity extends AppCompatActivity implements TorrentTasksEx
}
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@OptionsItem(android.R.id.home)
protected void navigateUp() {
TorrentsActivity_.intent(this).flags(Intent.FLAG_ACTIVITY_CLEAR_TOP).start();

14
app/src/main/java/org/transdroid/core/gui/TorrentsActivity.java

@ -395,7 +395,6 @@ public class TorrentsActivity extends AppCompatActivity implements TorrentTasksE @@ -395,7 +395,6 @@ public class TorrentsActivity extends AppCompatActivity implements TorrentTasksE
}
}
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public void startAutoRefresh() {
// Check if already running
if (autoRefreshTask != null || stopRefresh || systemSettings.getRefreshIntervalMilliseconds() == 0) {
@ -1026,12 +1025,13 @@ public class TorrentsActivity extends AppCompatActivity implements TorrentTasksE @@ -1026,12 +1025,13 @@ public class TorrentsActivity extends AppCompatActivity implements TorrentTasksE
@Background
protected void addTorrentByFile(String localFile, String title) {
if (!navigationHelper.checkTorrentReadPermission(this)) {
// No read permission yet (which we get the result of in onRequestPermissionsResult)
awaitingAddLocalFile = localFile;
awaitingAddTitle = title;
return;
}
// TODO EKO
// if (!navigationHelper.checkTorrentReadPermission(this)) {
// // No read permission yet (which we get the result of in onRequestPermissionsResult)
// awaitingAddLocalFile = localFile;
// awaitingAddTitle = title;
// return;
// }
DaemonTaskResult result = AddByFileTask.create(currentConnection, localFile).execute(log);
if (result instanceof DaemonTaskSuccessResult) {
onTaskSucceeded((DaemonTaskSuccessResult) result, getString(R.string.result_added, title));

18
app/src/main/java/org/transdroid/core/gui/navigation/NavigationHelper.java

@ -134,24 +134,6 @@ public class NavigationHelper { @@ -134,24 +134,6 @@ public class NavigationHelper {
return null;
}
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
public boolean checkTorrentReadPermission(final Activity activity) {
return Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT ||
checkPermission(activity, Manifest.permission.READ_EXTERNAL_STORAGE, REQUEST_TORRENT_READ_PERMISSION);
}
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
public boolean checkSettingsReadPermission(final Activity activity) {
return Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT ||
checkPermission(activity, Manifest.permission.READ_EXTERNAL_STORAGE, REQUEST_SETTINGS_READ_PERMISSION);
}
@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
public boolean checkSettingsWritePermission(final Activity activity) {
return Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT ||
checkPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE, REQUEST_SETTINGS_WRITE_PERMISSION);
}
private boolean checkPermission(final Activity activity, final String permission, final int requestCode) {
if (hasPermission(permission))
// Permission already granted

1
app/src/main/java/org/transdroid/core/gui/rss/RssFeedsActivity.java

@ -150,7 +150,6 @@ public class RssFeedsActivity extends AppCompatActivity { @@ -150,7 +150,6 @@ public class RssFeedsActivity extends AppCompatActivity {
}
}
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@OptionsItem(android.R.id.home)
protected void navigateUp() {
TorrentsActivity_.intent(this).flags(Intent.FLAG_ACTIVITY_CLEAR_TOP).start();

1
app/src/main/java/org/transdroid/core/gui/rss/RssItemsActivity.java

@ -74,7 +74,6 @@ public class RssItemsActivity extends AppCompatActivity { @@ -74,7 +74,6 @@ public class RssItemsActivity extends AppCompatActivity {
fragmentItems.update(rssfeed, false, requiresExternalAuthentication);
}
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@OptionsItem(android.R.id.home)
protected void navigateUp() {
TorrentsActivity_.intent(this).flags(Intent.FLAG_ACTIVITY_CLEAR_TOP).start();

1
app/src/main/java/org/transdroid/core/gui/search/SearchActivity.java

@ -277,7 +277,6 @@ public class SearchActivity extends AppCompatActivity { @@ -277,7 +277,6 @@ public class SearchActivity extends AppCompatActivity {
}
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@OptionsItem(android.R.id.home)
protected void navigateUp() {
TorrentsActivity_.intent(this).flags(Intent.FLAG_ACTIVITY_CLEAR_TOP).start();

3
app/src/main/java/org/transdroid/core/gui/settings/HelpSettingsActivity.java

@ -16,11 +16,9 @@ @@ -16,11 +16,9 @@
*/
package org.transdroid.core.gui.settings;
import android.annotation.TargetApi;
import android.app.Dialog;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import androidx.preference.Preference;
@ -88,7 +86,6 @@ public class HelpSettingsActivity extends PreferenceCompatActivity { @@ -88,7 +86,6 @@ public class HelpSettingsActivity extends PreferenceCompatActivity {
findPreference("system_about").setOnPreferenceClickListener(onAboutClick);
}
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@OptionsItem(android.R.id.home)
protected void navigateUp() {
MainSettingsActivity_.intent(this).flags(Intent.FLAG_ACTIVITY_CLEAR_TOP).start();

3
app/src/main/java/org/transdroid/core/gui/settings/MainSettingsActivity.java

@ -16,13 +16,11 @@ @@ -16,13 +16,11 @@
*/
package org.transdroid.core.gui.settings;
import android.annotation.TargetApi;
import android.app.Dialog;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import androidx.appcompat.app.AlertDialog;
@ -256,7 +254,6 @@ public class MainSettingsActivity extends PreferenceCompatActivity { @@ -256,7 +254,6 @@ public class MainSettingsActivity extends PreferenceCompatActivity {
}
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@OptionsItem(android.R.id.home)
protected void navigateUp() {
TorrentsActivity_.intent(this).flags(Intent.FLAG_ACTIVITY_CLEAR_TOP).start();

3
app/src/main/java/org/transdroid/core/gui/settings/NotificationSettingsActivity.java

@ -16,11 +16,9 @@ @@ -16,11 +16,9 @@
*/
package org.transdroid.core.gui.settings;
import android.annotation.TargetApi;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.os.Build;
import android.os.Bundle;
import androidx.annotation.Nullable;
@ -71,7 +69,6 @@ public class NotificationSettingsActivity extends PreferenceCompatActivity imple @@ -71,7 +69,6 @@ public class NotificationSettingsActivity extends PreferenceCompatActivity imple
getPreferenceScreen().getSharedPreferences().unregisterOnSharedPreferenceChangeListener(this);
}
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@OptionsItem(android.R.id.home)
protected void navigateUp() {
MainSettingsActivity_.intent(this).flags(Intent.FLAG_ACTIVITY_CLEAR_TOP).start();

3
app/src/main/java/org/transdroid/core/gui/settings/RssfeedSettingsActivity.java

@ -16,10 +16,8 @@ @@ -16,10 +16,8 @@
*/
package org.transdroid.core.gui.settings;
import android.annotation.TargetApi;
import android.app.Dialog;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import androidx.appcompat.app.AlertDialog;
@ -60,7 +58,6 @@ public class RssfeedSettingsActivity extends KeyBoundPreferencesActivity { @@ -60,7 +58,6 @@ public class RssfeedSettingsActivity extends KeyBoundPreferencesActivity {
}
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@OptionsItem(android.R.id.home)
protected void navigateUp() {
MainSettingsActivity_.intent(this).flags(Intent.FLAG_ACTIVITY_CLEAR_TOP).start();

4
app/src/main/java/org/transdroid/core/gui/settings/ServerSettingsActivity.java

@ -16,11 +16,9 @@ @@ -16,11 +16,9 @@
*/
package org.transdroid.core.gui.settings;
import android.annotation.TargetApi;
import android.app.Dialog;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import androidx.annotation.NonNull;
@ -95,7 +93,6 @@ public class ServerSettingsActivity extends KeyBoundPreferencesActivity { @@ -95,7 +93,6 @@ public class ServerSettingsActivity extends KeyBoundPreferencesActivity {
});
}
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@OptionsItem(android.R.id.home)
protected void navigateUp() {
MainSettingsActivity_.intent(this).flags(Intent.FLAG_ACTIVITY_CLEAR_TOP).start();
@ -123,6 +120,7 @@ public class ServerSettingsActivity extends KeyBoundPreferencesActivity { @@ -123,6 +120,7 @@ public class ServerSettingsActivity extends KeyBoundPreferencesActivity {
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
if (connectivityHelper.requestedPermissionWasGranted(requestCode, permissions, grantResults)) {
localNetworkPreference.getOnPreferenceClickListener().onPreferenceClick(localNetworkPreference);
}

59
app/src/main/java/org/transdroid/core/gui/settings/SystemSettingsActivity.java

@ -16,17 +16,14 @@ @@ -16,17 +16,14 @@
*/
package org.transdroid.core.gui.settings;
import android.annotation.TargetApi;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.preference.Preference.OnPreferenceClickListener;
import androidx.preference.PreferenceManager;
@ -48,7 +45,6 @@ import org.transdroid.core.gui.search.BarcodeHelper; @@ -48,7 +45,6 @@ import org.transdroid.core.gui.search.BarcodeHelper;
import org.transdroid.core.gui.search.SearchHistoryProvider;
import org.transdroid.core.service.AppUpdateJob;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@ -88,9 +84,6 @@ public class SystemSettingsActivity extends PreferenceCompatActivity { @@ -88,9 +84,6 @@ public class SystemSettingsActivity extends PreferenceCompatActivity {
private OnClickListener importSettingsFromFile = new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT
&& !navigationHelper.checkSettingsReadPermission(SystemSettingsActivity.this))
return; // We are requesting permission to access file storage
importSettingsFromFile();
}
};
@ -101,9 +94,6 @@ public class SystemSettingsActivity extends PreferenceCompatActivity { @@ -101,9 +94,6 @@ public class SystemSettingsActivity extends PreferenceCompatActivity {
private OnClickListener exportSettingsToFile = new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT
&& !navigationHelper.checkSettingsWritePermission(SystemSettingsActivity.this))
return; // We are requesting permission to access file storage
exportSettingsToFile();
}
};
@ -142,41 +132,17 @@ public class SystemSettingsActivity extends PreferenceCompatActivity { @@ -142,41 +132,17 @@ public class SystemSettingsActivity extends PreferenceCompatActivity {
findPreference("system_exportsettings").setOnPreferenceClickListener(onExportSettingsClick);
}
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@OptionsItem(android.R.id.home)
protected void navigateUp() {
MainSettingsActivity_.intent(this).flags(Intent.FLAG_ACTIVITY_CLEAR_TOP).start();
}
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
if (Boolean.TRUE.equals(navigationHelper.handleSettingsReadPermissionResult(requestCode, grantResults))) {
importSettingsFromFile();
} else if (Boolean.TRUE.equals(navigationHelper.handleSettingsWritePermissionResult(requestCode, grantResults))) {
exportSettingsToFile();
}
}
private void importSettingsFromFile() {
try {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(SystemSettingsActivity.this);
settingsPersistence.importSettingsFromFile(prefs, SettingsPersistence.DEFAULT_SETTINGS_FILE);
SnackbarManager.show(Snackbar.with(SystemSettingsActivity.this).text(R.string.pref_import_success));
} else {
Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);
intent.setType("application/json");
startActivityForResult(intent, ACTIVITY_IMPORT_SETTINGS);
}
} catch (FileNotFoundException e) {
SnackbarManager
.show(Snackbar.with(SystemSettingsActivity.this).text(R.string.error_file_not_found).colorResource(R.color.red));
} catch (JSONException e) {
SnackbarManager.show(Snackbar.with(SystemSettingsActivity.this)
.text(getString(R.string.error_no_valid_settings_file, getString(R.string.app_name))).colorResource(R.color.red));
}
}
@OnActivityResult(ACTIVITY_IMPORT_SETTINGS)
public void importSettingsFilePicked(int resultCode, Intent data) {
@ -196,23 +162,12 @@ public class SystemSettingsActivity extends PreferenceCompatActivity { @@ -196,23 +162,12 @@ public class SystemSettingsActivity extends PreferenceCompatActivity {
}
private void exportSettingsToFile() {
try {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(SystemSettingsActivity.this);
settingsPersistence.exportSettingsToFile(prefs, SettingsPersistence.DEFAULT_SETTINGS_FILE);
SnackbarManager.show(Snackbar.with(SystemSettingsActivity.this).text(R.string.pref_export_success));
} else {
Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);
intent.setType("application/json");
intent.putExtra(Intent.EXTRA_TITLE, SettingsPersistence.DEFAULT_SETTINGS_FILENAME);
startActivityForResult(intent, ACTIVITY_EXPORT_SETTINGS);
}
} catch (JSONException | IOException e) {
SnackbarManager.show(Snackbar.with(SystemSettingsActivity.this).text(R.string.error_cant_write_settings_file)
.colorResource(R.color.red));
}
}
@OnActivityResult(ACTIVITY_EXPORT_SETTINGS)
public void exportSettingsFilePicked(int resultCode, Intent data) {
@ -255,12 +210,7 @@ public class SystemSettingsActivity extends PreferenceCompatActivity { @@ -255,12 +210,7 @@ public class SystemSettingsActivity extends PreferenceCompatActivity {
case DIALOG_IMPORTSETTINGS:
// @formatter:off
return new AlertDialog.Builder(this)
.setMessage(
getString(
Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT
? R.string.pref_import_dialog : R.string.pref_import_dialog_android10,
getString(R.string.app_name),
SettingsPersistence.DEFAULT_SETTINGS_FILE.toString()))
.setMessage(getString(R.string.pref_import_dialog_android10))
.setPositiveButton(R.string.pref_import_fromfile, importSettingsFromFile)
.setNeutralButton(R.string.pref_import_fromqr, importSettingsFromQr)
.setNegativeButton(android.R.string.cancel, null)
@ -269,12 +219,7 @@ public class SystemSettingsActivity extends PreferenceCompatActivity { @@ -269,12 +219,7 @@ public class SystemSettingsActivity extends PreferenceCompatActivity {
case DIALOG_EXPORTSETTINGS:
// @formatter:off
return new AlertDialog.Builder(this)
.setMessage(
getString(
Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT
? R.string.pref_export_dialog : R.string.pref_export_dialog_android10,
getString(R.string.app_name),
SettingsPersistence.DEFAULT_SETTINGS_FILE.toString()))
.setMessage(getString(R.string.pref_export_dialog_android10))
.setPositiveButton(R.string.pref_export_tofile, exportSettingsToFile)
.setNeutralButton(R.string.pref_export_toqr, exportSettingsToQr)
.setNegativeButton(android.R.string.cancel, null)

3
app/src/main/java/org/transdroid/core/gui/settings/WebsearchSettingsActivity.java

@ -16,10 +16,8 @@ @@ -16,10 +16,8 @@
*/
package org.transdroid.core.gui.settings;
import android.annotation.TargetApi;
import android.app.Dialog;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import androidx.appcompat.app.AlertDialog;
@ -56,7 +54,6 @@ public class WebsearchSettingsActivity extends KeyBoundPreferencesActivity { @@ -56,7 +54,6 @@ public class WebsearchSettingsActivity extends KeyBoundPreferencesActivity {
}
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@OptionsItem(android.R.id.home)
protected void navigateUp() {
MainSettingsActivity_.intent(this).flags(Intent.FLAG_ACTIVITY_CLEAR_TOP).start();

1
app/src/main/java/org/transdroid/core/seedbox/DediseedboxSettingsActivity.java

@ -65,7 +65,6 @@ public class DediseedboxSettingsActivity extends KeyBoundPreferencesActivity { @@ -65,7 +65,6 @@ public class DediseedboxSettingsActivity extends KeyBoundPreferencesActivity {
}
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@OptionsItem(android.R.id.home)
protected void navigateUp() {
MainSettingsActivity_.intent(this).flags(Intent.FLAG_ACTIVITY_CLEAR_TOP).start();

1
app/src/main/java/org/transdroid/core/seedbox/XirvikDediSettingsActivity.java

@ -66,7 +66,6 @@ public class XirvikDediSettingsActivity extends KeyBoundPreferencesActivity { @@ -66,7 +66,6 @@ public class XirvikDediSettingsActivity extends KeyBoundPreferencesActivity {
}
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@OptionsItem(android.R.id.home)
protected void navigateUp() {
MainSettingsActivity_.intent(this).flags(Intent.FLAG_ACTIVITY_CLEAR_TOP).start();

1
app/src/main/java/org/transdroid/core/seedbox/XirvikSemiSettingsActivity.java

@ -65,7 +65,6 @@ public class XirvikSemiSettingsActivity extends KeyBoundPreferencesActivity { @@ -65,7 +65,6 @@ public class XirvikSemiSettingsActivity extends KeyBoundPreferencesActivity {
}
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@OptionsItem(android.R.id.home)
protected void navigateUp() {
MainSettingsActivity_.intent(this).flags(Intent.FLAG_ACTIVITY_CLEAR_TOP).start();

1
app/src/main/java/org/transdroid/core/seedbox/XirvikSettingsActivity.java

@ -120,7 +120,6 @@ public class XirvikSettingsActivity extends KeyBoundPreferencesActivity { @@ -120,7 +120,6 @@ public class XirvikSettingsActivity extends KeyBoundPreferencesActivity {
edit.apply();
}
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@OptionsItem(android.R.id.home)
protected void navigateUp() {
MainSettingsActivity_.intent(this).flags(Intent.FLAG_ACTIVITY_CLEAR_TOP).start();

1
app/src/main/java/org/transdroid/core/widget/ListWidgetConfigActivity.java

@ -64,7 +64,6 @@ import java.util.ArrayList; @@ -64,7 +64,6 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@EActivity(resName = "activity_widgetconfig")
public class ListWidgetConfigActivity extends AppCompatActivity {

1
app/src/main/java/org/transdroid/core/widget/ListWidgetProvider.java

@ -45,7 +45,6 @@ import org.transdroid.core.service.ControlService_; @@ -45,7 +45,6 @@ import org.transdroid.core.service.ControlService_;
*
* @author Eric Kok
*/
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@EReceiver
public class ListWidgetProvider extends AppWidgetProvider {

2
app/src/main/java/org/transdroid/core/widget/ListWidgetViewsService.java

@ -54,7 +54,6 @@ import java.util.List; @@ -54,7 +54,6 @@ import java.util.List;
*
* @author Eric Kok
*/
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
@EService
public class ListWidgetViewsService extends RemoteViewsService {
@ -65,7 +64,6 @@ public class ListWidgetViewsService extends RemoteViewsService { @@ -65,7 +64,6 @@ public class ListWidgetViewsService extends RemoteViewsService {
}
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
class WidgetViewsFactory implements RemoteViewsService.RemoteViewsFactory {
private final Context context;

1
app/src/main/java/org/transdroid/daemon/util/TlsSniSocketFactory.java

@ -100,7 +100,6 @@ public class TlsSniSocketFactory implements LayeredSocketFactory { @@ -100,7 +100,6 @@ public class TlsSniSocketFactory implements LayeredSocketFactory {
// TLS layer
@Override
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
public Socket createSocket(Socket plainSocket, String host, int port, boolean autoClose) throws IOException {
if (autoClose) {
// we don't need the plainSocket

2
app/src/main/res/values/strings.xml

@ -355,13 +355,11 @@ @@ -355,13 +355,11 @@
<string name="pref_clearsearch">Clear search history</string>
<string name="pref_clearsearch_success">Search history is cleared</string>
<string name="pref_import">Import settings</string>
<string name="pref_import_dialog">%1$s will try to import server, web search, RSS and system settings from: %2$s</string>
<string name="pref_import_dialog_android10">%1$s will try to import server, web search, RSS and system settings</string>
<string name="pref_import_fromfile">Use file</string>
<string name="pref_import_fromqr">Use QR code</string>
<string name="pref_import_success">Settings successfully imported</string>
<string name="pref_export">Export settings</string>
<string name="pref_export_dialog">%1$s will export server (including passwords), web search, RSS and system settings to the following plain text JSON file: %2$s</string>
<string name="pref_export_dialog_android10">%1$s will export server (including passwords), web search, RSS and system settings</string>
<string name="pref_export_tofile">To file</string>
<string name="pref_export_toqr">To QR code</string>

2
build.gradle

@ -6,7 +6,7 @@ buildscript { @@ -6,7 +6,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:8.1.4'
classpath 'com.android.tools.build:gradle:8.2.1'
}
}

2
gradle/wrapper/gradle-wrapper.properties vendored

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

Loading…
Cancel
Save