mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-26 06:11:19 +00:00
Improve "share to syncthing" and self-to-service binding (#162)
Related issues: #158 - FolderActivity not correctly disposed after dialog close #161 - mRunconditionmonitor not running after config import/export #163 - "Share to syncthing-folder" doesn't work when syncthing is not running * import/export Config: Only shutdown native if it is running (fixes #161) * Remove FolderPickerActivity#kitkat_external_storage_warning * Remove SyncthingActivity#registerOnServiceConnectedListener * Make "share to folder" available when syncthing is online or offline (fixes #163) Improve service connection * Add script to forward web UI port of an AVD Update README.md * SettingsActivity: Improve service connection * Correct self-class reference in FolderActivity (fixes #158) * Correct self-class reference in DeviceActivity (fixes #158) * Correct self-class reference in ShareActivity (fixes #158) * Remove unused string 1/2 * Remove unused string 2/2
This commit is contained in:
parent
b1c614cf21
commit
0fcd84da0e
39 changed files with 224 additions and 288 deletions
10
README.md
10
README.md
|
@ -66,6 +66,16 @@ To clean up all files generated during build, use the following commands:
|
||||||
|
|
||||||
`./gradlew clean`
|
`./gradlew clean`
|
||||||
|
|
||||||
|
### Development Notes
|
||||||
|
|
||||||
|
It is recommended to change the GUI and Listen Address ports for the debug app, e.g. to 8385 and 22001 respectively.
|
||||||
|
|
||||||
|
The Syncthing native used for this android application provides a web interface by default. It can be accessed via the Settings menu -> 'Web GUI'. It is quite helpful to access this web interface from your development machine. Read android documentation on how to access the network of your emulator. Or use the following command to connect to the single currently running emulator/AVD.
|
||||||
|
|
||||||
|
adb forward tcp:18384 tcp:8384
|
||||||
|
|
||||||
|
Start Syncthing app on your emulator and access the web interface from you favorite browser of your development machine via https://127.0.0.1:18384
|
||||||
|
|
||||||
# License
|
# License
|
||||||
|
|
||||||
The project is licensed under the [MPLv2](LICENSE).
|
The project is licensed under the [MPLv2](LICENSE).
|
||||||
|
|
7
adb_forward_webui.cmd
Normal file
7
adb_forward_webui.cmd
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
@echo off
|
||||||
|
REM
|
||||||
|
REM adb forward local_port to emulator_port
|
||||||
|
echo Running ADB to setup port forwarding on the emulated Android device ...
|
||||||
|
adb forward tcp:18384 tcp:8384
|
||||||
|
echo Done.
|
||||||
|
timeout 3
|
|
@ -1,12 +1,14 @@
|
||||||
package com.nutomic.syncthingandroid.activities;
|
package com.nutomic.syncthingandroid.activities;
|
||||||
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
|
import android.content.ComponentName;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.IBinder;
|
||||||
import android.support.v4.content.ContextCompat;
|
import android.support.v4.content.ContextCompat;
|
||||||
import android.support.v7.app.AlertDialog;
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.support.v7.widget.SwitchCompat;
|
import android.support.v7.widget.SwitchCompat;
|
||||||
|
@ -32,6 +34,7 @@ import com.nutomic.syncthingandroid.model.Device;
|
||||||
import com.nutomic.syncthingandroid.service.Constants;
|
import com.nutomic.syncthingandroid.service.Constants;
|
||||||
import com.nutomic.syncthingandroid.service.RestApi;
|
import com.nutomic.syncthingandroid.service.RestApi;
|
||||||
import com.nutomic.syncthingandroid.service.SyncthingService;
|
import com.nutomic.syncthingandroid.service.SyncthingService;
|
||||||
|
import com.nutomic.syncthingandroid.service.SyncthingServiceBinder;
|
||||||
import com.nutomic.syncthingandroid.SyncthingApp;
|
import com.nutomic.syncthingandroid.SyncthingApp;
|
||||||
import com.nutomic.syncthingandroid.util.Compression;
|
import com.nutomic.syncthingandroid.util.Compression;
|
||||||
import com.nutomic.syncthingandroid.util.ConfigRouter;
|
import com.nutomic.syncthingandroid.util.ConfigRouter;
|
||||||
|
@ -57,7 +60,6 @@ import static com.nutomic.syncthingandroid.util.Compression.METADATA;
|
||||||
public class DeviceActivity extends SyncthingActivity
|
public class DeviceActivity extends SyncthingActivity
|
||||||
implements
|
implements
|
||||||
View.OnClickListener,
|
View.OnClickListener,
|
||||||
SyncthingActivity.OnServiceConnectedListener,
|
|
||||||
SyncthingService.OnServiceStateChangeListener {
|
SyncthingService.OnServiceStateChangeListener {
|
||||||
|
|
||||||
public static final String EXTRA_NOTIFICATION_ID =
|
public static final String EXTRA_NOTIFICATION_ID =
|
||||||
|
@ -197,7 +199,6 @@ public class DeviceActivity extends SyncthingActivity
|
||||||
|
|
||||||
mIsCreateMode = getIntent().getBooleanExtra(EXTRA_IS_CREATE, false);
|
mIsCreateMode = getIntent().getBooleanExtra(EXTRA_IS_CREATE, false);
|
||||||
setTitle(mIsCreateMode ? R.string.add_device : R.string.edit_device);
|
setTitle(mIsCreateMode ? R.string.add_device : R.string.edit_device);
|
||||||
registerOnServiceConnectedListener(this);
|
|
||||||
|
|
||||||
mIdContainer = findViewById(R.id.idContainer);
|
mIdContainer = findViewById(R.id.idContainer);
|
||||||
mIdView = findViewById(R.id.id);
|
mIdView = findViewById(R.id.id);
|
||||||
|
@ -263,82 +264,16 @@ public class DeviceActivity extends SyncthingActivity
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onDestroy() {
|
|
||||||
super.onDestroy();
|
|
||||||
SyncthingService syncthingService = getService();
|
|
||||||
if (syncthingService != null) {
|
|
||||||
syncthingService.getNotificationHandler().cancelConsentNotification(getIntent().getIntExtra(EXTRA_NOTIFICATION_ID, 0));
|
|
||||||
syncthingService.unregisterOnServiceStateChangeListener(this::onServiceStateChange);
|
|
||||||
}
|
|
||||||
mIdView.removeTextChangedListener(mIdTextWatcher);
|
|
||||||
mNameView.removeTextChangedListener(mNameTextWatcher);
|
|
||||||
mAddressesView.removeTextChangedListener(mAddressesTextWatcher);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onPause() {
|
|
||||||
super.onPause();
|
|
||||||
|
|
||||||
// We don't want to update every time a TextView's character changes,
|
|
||||||
// so we hold off until the view stops being visible to the user.
|
|
||||||
if (mDeviceNeedsToUpdate) {
|
|
||||||
updateDevice();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Save current settings in case we are in create mode and they aren't yet stored in the config.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void onSaveInstanceState(Bundle outState) {
|
|
||||||
super.onSaveInstanceState(outState);
|
|
||||||
outState.putString("device", new Gson().toJson(mDevice));
|
|
||||||
if (mIsCreateMode){
|
|
||||||
outState.putBoolean(IS_SHOWING_DISCARD_DIALOG, mDiscardDialog != null && mDiscardDialog.isShowing());
|
|
||||||
Util.dismissDialogSafe(mDiscardDialog, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
outState.putBoolean(IS_SHOWING_COMPRESSION_DIALOG, mCompressionDialog != null && mCompressionDialog.isShowing());
|
|
||||||
Util.dismissDialogSafe(mCompressionDialog, this);
|
|
||||||
|
|
||||||
outState.putBoolean(IS_SHOWING_DELETE_DIALOG, mDeleteDialog != null && mDeleteDialog.isShowing());
|
|
||||||
Util.dismissDialogSafe(mDeleteDialog, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register for service state change events.
|
* Register for service state change events.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void onServiceConnected() {
|
public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
|
||||||
Log.v(TAG, "onServiceConnected");
|
super.onServiceConnected(componentName, iBinder);
|
||||||
SyncthingService syncthingService = (SyncthingService) getService();
|
SyncthingServiceBinder syncthingServiceBinder = (SyncthingServiceBinder) iBinder;
|
||||||
|
SyncthingService syncthingService = (SyncthingService) syncthingServiceBinder.getService();
|
||||||
syncthingService.getNotificationHandler().cancelConsentNotification(getIntent().getIntExtra(EXTRA_NOTIFICATION_ID, 0));
|
syncthingService.getNotificationHandler().cancelConsentNotification(getIntent().getIntExtra(EXTRA_NOTIFICATION_ID, 0));
|
||||||
syncthingService.registerOnServiceStateChangeListener(this);
|
syncthingService.registerOnServiceStateChangeListener(DeviceActivity.this);
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets version and current address of the device.
|
|
||||||
* NOTE: This is only called once on startup, should be called more often to properly display
|
|
||||||
* version/address changes.
|
|
||||||
*/
|
|
||||||
private void onReceiveConnections(Connections connections) {
|
|
||||||
if (connections == null || connections.connections == null) {
|
|
||||||
Log.e(TAG, "onReceiveConnections: connections == null || connections.connections == null");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (mDevice == null) {
|
|
||||||
Log.e(TAG, "onReceiveConnections: mDevice == null");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean viewsExist = mSyncthingVersionView != null && mCurrentAddressView != null;
|
|
||||||
if (viewsExist && connections.connections.containsKey(mDevice.deviceID)) {
|
|
||||||
mCurrentAddressView.setVisibility(VISIBLE);
|
|
||||||
mSyncthingVersionView.setVisibility(VISIBLE);
|
|
||||||
mCurrentAddressView.setText(connections.connections.get(mDevice.deviceID).address);
|
|
||||||
mSyncthingVersionView.setText(connections.connections.get(mDevice.deviceID).clientVersion);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -366,6 +301,83 @@ public class DeviceActivity extends SyncthingActivity
|
||||||
updateViewsAndSetListeners();
|
updateViewsAndSetListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBackPressed() {
|
||||||
|
if (mIsCreateMode) {
|
||||||
|
showDiscardDialog();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
super.onBackPressed();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPause() {
|
||||||
|
super.onPause();
|
||||||
|
|
||||||
|
// We don't want to update every time a TextView's character changes,
|
||||||
|
// so we hold off until the view stops being visible to the user.
|
||||||
|
if (mDeviceNeedsToUpdate) {
|
||||||
|
updateDevice();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
SyncthingService syncthingService = getService();
|
||||||
|
if (syncthingService != null) {
|
||||||
|
syncthingService.getNotificationHandler().cancelConsentNotification(getIntent().getIntExtra(EXTRA_NOTIFICATION_ID, 0));
|
||||||
|
syncthingService.unregisterOnServiceStateChangeListener(DeviceActivity.this);
|
||||||
|
}
|
||||||
|
mIdView.removeTextChangedListener(mIdTextWatcher);
|
||||||
|
mNameView.removeTextChangedListener(mNameTextWatcher);
|
||||||
|
mAddressesView.removeTextChangedListener(mAddressesTextWatcher);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Save current settings in case we are in create mode and they aren't yet stored in the config.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void onSaveInstanceState(Bundle outState) {
|
||||||
|
super.onSaveInstanceState(outState);
|
||||||
|
outState.putString("device", new Gson().toJson(mDevice));
|
||||||
|
if (mIsCreateMode){
|
||||||
|
outState.putBoolean(IS_SHOWING_DISCARD_DIALOG, mDiscardDialog != null && mDiscardDialog.isShowing());
|
||||||
|
Util.dismissDialogSafe(mDiscardDialog, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
outState.putBoolean(IS_SHOWING_COMPRESSION_DIALOG, mCompressionDialog != null && mCompressionDialog.isShowing());
|
||||||
|
Util.dismissDialogSafe(mCompressionDialog, this);
|
||||||
|
|
||||||
|
outState.putBoolean(IS_SHOWING_DELETE_DIALOG, mDeleteDialog != null && mDeleteDialog.isShowing());
|
||||||
|
Util.dismissDialogSafe(mDeleteDialog, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets version and current address of the device.
|
||||||
|
* NOTE: This is only called once on startup, should be called more often to properly display
|
||||||
|
* version/address changes.
|
||||||
|
*/
|
||||||
|
private void onReceiveConnections(Connections connections) {
|
||||||
|
if (connections == null || connections.connections == null) {
|
||||||
|
Log.e(TAG, "onReceiveConnections: connections == null || connections.connections == null");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (mDevice == null) {
|
||||||
|
Log.e(TAG, "onReceiveConnections: mDevice == null");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean viewsExist = mSyncthingVersionView != null && mCurrentAddressView != null;
|
||||||
|
if (viewsExist && connections.connections.containsKey(mDevice.deviceID)) {
|
||||||
|
mCurrentAddressView.setVisibility(VISIBLE);
|
||||||
|
mSyncthingVersionView.setVisibility(VISIBLE);
|
||||||
|
mCurrentAddressView.setText(connections.connections.get(mDevice.deviceID).address);
|
||||||
|
mSyncthingVersionView.setText(connections.connections.get(mDevice.deviceID).clientVersion);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void updateViewsAndSetListeners() {
|
private void updateViewsAndSetListeners() {
|
||||||
mIdView.removeTextChangedListener(mIdTextWatcher);
|
mIdView.removeTextChangedListener(mIdTextWatcher);
|
||||||
mNameView.removeTextChangedListener(mNameTextWatcher);
|
mNameView.removeTextChangedListener(mNameTextWatcher);
|
||||||
|
@ -609,16 +621,6 @@ public class DeviceActivity extends SyncthingActivity
|
||||||
shareIntent, context.getString(R.string.send_device_id_to)));
|
shareIntent, context.getString(R.string.send_device_id_to)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBackPressed() {
|
|
||||||
if (mIsCreateMode) {
|
|
||||||
showDiscardDialog();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
super.onBackPressed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void showDiscardDialog(){
|
private void showDiscardDialog(){
|
||||||
mDiscardDialog = createDiscardDialog();
|
mDiscardDialog = createDiscardDialog();
|
||||||
mDiscardDialog.show();
|
mDiscardDialog.show();
|
||||||
|
|
|
@ -4,11 +4,13 @@ import android.annotation.SuppressLint;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
|
import android.content.ComponentName;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.IBinder;
|
||||||
import android.support.v4.provider.DocumentFile;
|
import android.support.v4.provider.DocumentFile;
|
||||||
import android.support.v7.widget.SwitchCompat;
|
import android.support.v7.widget.SwitchCompat;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
|
@ -35,6 +37,7 @@ import com.nutomic.syncthingandroid.model.FolderIgnoreList;
|
||||||
import com.nutomic.syncthingandroid.service.Constants;
|
import com.nutomic.syncthingandroid.service.Constants;
|
||||||
import com.nutomic.syncthingandroid.service.RestApi;
|
import com.nutomic.syncthingandroid.service.RestApi;
|
||||||
import com.nutomic.syncthingandroid.service.SyncthingService;
|
import com.nutomic.syncthingandroid.service.SyncthingService;
|
||||||
|
import com.nutomic.syncthingandroid.service.SyncthingServiceBinder;
|
||||||
import com.nutomic.syncthingandroid.SyncthingApp;
|
import com.nutomic.syncthingandroid.SyncthingApp;
|
||||||
import com.nutomic.syncthingandroid.util.ConfigRouter;
|
import com.nutomic.syncthingandroid.util.ConfigRouter;
|
||||||
import com.nutomic.syncthingandroid.util.FileUtils;
|
import com.nutomic.syncthingandroid.util.FileUtils;
|
||||||
|
@ -60,7 +63,7 @@ import static com.nutomic.syncthingandroid.service.SyncthingService.State.ACTIVE
|
||||||
* Shows folder details and allows changing them.
|
* Shows folder details and allows changing them.
|
||||||
*/
|
*/
|
||||||
public class FolderActivity extends SyncthingActivity
|
public class FolderActivity extends SyncthingActivity
|
||||||
implements SyncthingActivity.OnServiceConnectedListener, SyncthingService.OnServiceStateChangeListener {
|
implements SyncthingService.OnServiceStateChangeListener {
|
||||||
|
|
||||||
public static final String EXTRA_NOTIFICATION_ID =
|
public static final String EXTRA_NOTIFICATION_ID =
|
||||||
"com.nutomic.syncthingandroid.activities.FolderActivity.NOTIFICATION_ID";
|
"com.nutomic.syncthingandroid.activities.FolderActivity.NOTIFICATION_ID";
|
||||||
|
@ -181,7 +184,6 @@ public class FolderActivity extends SyncthingActivity
|
||||||
|
|
||||||
mIsCreateMode = getIntent().getBooleanExtra(EXTRA_IS_CREATE, false);
|
mIsCreateMode = getIntent().getBooleanExtra(EXTRA_IS_CREATE, false);
|
||||||
setTitle(mIsCreateMode ? R.string.create_folder : R.string.edit_folder);
|
setTitle(mIsCreateMode ? R.string.create_folder : R.string.edit_folder);
|
||||||
registerOnServiceConnectedListener(this);
|
|
||||||
|
|
||||||
mLabelView = findViewById(R.id.label);
|
mLabelView = findViewById(R.id.label);
|
||||||
mIdView = findViewById(R.id.id);
|
mIdView = findViewById(R.id.id);
|
||||||
|
@ -339,16 +341,13 @@ public class FolderActivity extends SyncthingActivity
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onBackPressed() {
|
||||||
super.onDestroy();
|
if (mIsCreateMode) {
|
||||||
SyncthingService syncthingService = getService();
|
showDiscardDialog();
|
||||||
if (syncthingService != null) {
|
}
|
||||||
syncthingService.getNotificationHandler().cancelConsentNotification(getIntent().getIntExtra(EXTRA_NOTIFICATION_ID, 0));
|
else {
|
||||||
syncthingService.unregisterOnServiceStateChangeListener(this::onServiceStateChange);
|
super.onBackPressed();
|
||||||
}
|
}
|
||||||
mLabelView.removeTextChangedListener(mTextWatcher);
|
|
||||||
mIdView.removeTextChangedListener(mTextWatcher);
|
|
||||||
mEditIgnoreListContent.removeTextChangedListener(mTextWatcher);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -369,6 +368,19 @@ public class FolderActivity extends SyncthingActivity
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
SyncthingService syncthingService = getService();
|
||||||
|
if (syncthingService != null) {
|
||||||
|
syncthingService.getNotificationHandler().cancelConsentNotification(getIntent().getIntExtra(EXTRA_NOTIFICATION_ID, 0));
|
||||||
|
syncthingService.unregisterOnServiceStateChangeListener(FolderActivity.this);
|
||||||
|
}
|
||||||
|
mLabelView.removeTextChangedListener(mTextWatcher);
|
||||||
|
mIdView.removeTextChangedListener(mTextWatcher);
|
||||||
|
mEditIgnoreListContent.removeTextChangedListener(mTextWatcher);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onSaveInstanceState(Bundle outState) {
|
protected void onSaveInstanceState(Bundle outState) {
|
||||||
super.onSaveInstanceState(outState);
|
super.onSaveInstanceState(outState);
|
||||||
|
@ -385,11 +397,12 @@ public class FolderActivity extends SyncthingActivity
|
||||||
* Register for service state change events.
|
* Register for service state change events.
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void onServiceConnected() {
|
public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
|
||||||
Log.v(TAG, "onServiceConnected");
|
super.onServiceConnected(componentName, iBinder);
|
||||||
SyncthingService syncthingService = (SyncthingService) getService();
|
SyncthingServiceBinder syncthingServiceBinder = (SyncthingServiceBinder) iBinder;
|
||||||
|
SyncthingService syncthingService = (SyncthingService) syncthingServiceBinder.getService();
|
||||||
syncthingService.getNotificationHandler().cancelConsentNotification(getIntent().getIntExtra(EXTRA_NOTIFICATION_ID, 0));
|
syncthingService.getNotificationHandler().cancelConsentNotification(getIntent().getIntExtra(EXTRA_NOTIFICATION_ID, 0));
|
||||||
syncthingService.registerOnServiceStateChangeListener(this);
|
syncthingService.registerOnServiceStateChangeListener(FolderActivity.this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -755,16 +768,6 @@ public class FolderActivity extends SyncthingActivity
|
||||||
mConfig.updateFolder(restApi, mFolder);
|
mConfig.updateFolder(restApi, mFolder);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBackPressed() {
|
|
||||||
if (mIsCreateMode) {
|
|
||||||
showDiscardDialog();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
super.onBackPressed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void showDiscardDialog(){
|
private void showDiscardDialog(){
|
||||||
mDiscardDialog = createDiscardDialog();
|
mDiscardDialog = createDiscardDialog();
|
||||||
mDiscardDialog.show();
|
mDiscardDialog.show();
|
||||||
|
|
|
@ -98,12 +98,6 @@ public class FolderPickerActivity extends SyncthingActivity
|
||||||
} else {
|
} else {
|
||||||
displayRoot();
|
displayRoot();
|
||||||
}
|
}
|
||||||
|
|
||||||
Boolean prefUseRoot = PreferenceManager.getDefaultSharedPreferences(this).getBoolean(Constants.PREF_USE_ROOT, false);
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && !prefUseRoot) {
|
|
||||||
Toast.makeText(this, R.string.kitkat_external_storage_warning, Toast.LENGTH_LONG)
|
|
||||||
.show();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,12 +2,14 @@ package com.nutomic.syncthingandroid.activities;
|
||||||
|
|
||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
|
import android.content.ComponentName;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.IBinder;
|
||||||
import android.preference.CheckBoxPreference;
|
import android.preference.CheckBoxPreference;
|
||||||
import android.preference.EditTextPreference;
|
import android.preference.EditTextPreference;
|
||||||
import android.preference.ListPreference;
|
import android.preference.ListPreference;
|
||||||
|
@ -34,6 +36,7 @@ import com.nutomic.syncthingandroid.service.Constants;
|
||||||
import com.nutomic.syncthingandroid.service.NotificationHandler;
|
import com.nutomic.syncthingandroid.service.NotificationHandler;
|
||||||
import com.nutomic.syncthingandroid.service.RestApi;
|
import com.nutomic.syncthingandroid.service.RestApi;
|
||||||
import com.nutomic.syncthingandroid.service.SyncthingService;
|
import com.nutomic.syncthingandroid.service.SyncthingService;
|
||||||
|
import com.nutomic.syncthingandroid.service.SyncthingServiceBinder;
|
||||||
import com.nutomic.syncthingandroid.util.Languages;
|
import com.nutomic.syncthingandroid.util.Languages;
|
||||||
import com.nutomic.syncthingandroid.util.Util;
|
import com.nutomic.syncthingandroid.util.Util;
|
||||||
import com.nutomic.syncthingandroid.views.WifiSsidPreference;
|
import com.nutomic.syncthingandroid.views.WifiSsidPreference;
|
||||||
|
@ -49,18 +52,22 @@ import eu.chainfire.libsuperuser.Shell;
|
||||||
|
|
||||||
public class SettingsActivity extends SyncthingActivity {
|
public class SettingsActivity extends SyncthingActivity {
|
||||||
|
|
||||||
|
private static final String TAG = "SettingsActivity";
|
||||||
|
|
||||||
|
private SettingsFragment mSettingsFragment;
|
||||||
|
|
||||||
public static final String EXTRA_OPEN_SUB_PREF_SCREEN =
|
public static final String EXTRA_OPEN_SUB_PREF_SCREEN =
|
||||||
"com.nutomic.syncthingandroid.activities.SettingsActivity.OPEN_SUB_PREF_SCREEN";
|
"com.nutomic.syncthingandroid.activities.SettingsActivity.OPEN_SUB_PREF_SCREEN";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
SettingsFragment settingsFragment = new SettingsFragment();
|
mSettingsFragment = new SettingsFragment();
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putString(EXTRA_OPEN_SUB_PREF_SCREEN, getIntent().getStringExtra(EXTRA_OPEN_SUB_PREF_SCREEN));
|
bundle.putString(EXTRA_OPEN_SUB_PREF_SCREEN, getIntent().getStringExtra(EXTRA_OPEN_SUB_PREF_SCREEN));
|
||||||
settingsFragment.setArguments(bundle);
|
mSettingsFragment.setArguments(bundle);
|
||||||
getFragmentManager().beginTransaction()
|
getFragmentManager().beginTransaction()
|
||||||
.replace(android.R.id.content, settingsFragment)
|
.replace(android.R.id.content, mSettingsFragment)
|
||||||
.commit();
|
.commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,10 +91,19 @@ public class SettingsActivity extends SyncthingActivity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
|
||||||
|
super.onServiceConnected(componentName, iBinder);
|
||||||
|
SyncthingServiceBinder syncthingServiceBinder = (SyncthingServiceBinder) iBinder;
|
||||||
|
SyncthingService syncthingService = (SyncthingService) syncthingServiceBinder.getService();
|
||||||
|
mSettingsFragment.setService(syncthingService);
|
||||||
|
syncthingService.registerOnServiceStateChangeListener(mSettingsFragment);
|
||||||
|
}
|
||||||
|
|
||||||
public static class SettingsFragment extends PreferenceFragment
|
public static class SettingsFragment extends PreferenceFragment
|
||||||
implements SyncthingActivity.OnServiceConnectedListener,
|
implements SyncthingService.OnServiceStateChangeListener,
|
||||||
SyncthingService.OnServiceStateChangeListener, Preference.OnPreferenceChangeListener,
|
Preference.OnPreferenceChangeListener,
|
||||||
Preference.OnPreferenceClickListener {
|
Preference.OnPreferenceClickListener {
|
||||||
|
|
||||||
private static final String TAG = "SettingsFragment";
|
private static final String TAG = "SettingsFragment";
|
||||||
private static final String KEY_EXPORT_CONFIG = "export_config";
|
private static final String KEY_EXPORT_CONFIG = "export_config";
|
||||||
|
@ -150,7 +166,6 @@ public class SettingsActivity extends SyncthingActivity {
|
||||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
((SyncthingApp) getActivity().getApplication()).component().inject(this);
|
((SyncthingApp) getActivity().getApplication()).component().inject(this);
|
||||||
((SyncthingActivity) getActivity()).registerOnServiceConnectedListener(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -304,14 +319,8 @@ public class SettingsActivity extends SyncthingActivity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public void setService(SyncthingService syncthingService) {
|
||||||
public void onServiceConnected() {
|
mSyncthingService = syncthingService;
|
||||||
Log.v(TAG, "onServiceConnected");
|
|
||||||
if (getActivity() == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
mSyncthingService = ((SyncthingActivity) getActivity()).getService();
|
|
||||||
mSyncthingService.registerOnServiceStateChangeListener(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
package com.nutomic.syncthingandroid.activities;
|
package com.nutomic.syncthingandroid.activities;
|
||||||
|
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
|
import android.content.ComponentName;
|
||||||
import android.content.ContentResolver;
|
import android.content.ContentResolver;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.IBinder;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
import android.provider.MediaStore;
|
import android.provider.MediaStore;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
@ -24,7 +26,10 @@ import android.widget.Toast;
|
||||||
import com.google.common.io.Files;
|
import com.google.common.io.Files;
|
||||||
import com.nutomic.syncthingandroid.R;
|
import com.nutomic.syncthingandroid.R;
|
||||||
import com.nutomic.syncthingandroid.model.Folder;
|
import com.nutomic.syncthingandroid.model.Folder;
|
||||||
|
import com.nutomic.syncthingandroid.service.RestApi;
|
||||||
import com.nutomic.syncthingandroid.service.SyncthingService;
|
import com.nutomic.syncthingandroid.service.SyncthingService;
|
||||||
|
import com.nutomic.syncthingandroid.service.SyncthingServiceBinder;
|
||||||
|
import com.nutomic.syncthingandroid.util.ConfigRouter;
|
||||||
import com.nutomic.syncthingandroid.util.Util;
|
import com.nutomic.syncthingandroid.util.Util;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
@ -46,23 +51,33 @@ import java.util.Map;
|
||||||
* ownCloud Android {@see https://github.com/owncloud/android/blob/79664304fdb762b2e04f1ac505f50d0923ddd212/src/com/owncloud/android/utils/UriUtils.java#L193}
|
* ownCloud Android {@see https://github.com/owncloud/android/blob/79664304fdb762b2e04f1ac505f50d0923ddd212/src/com/owncloud/android/utils/UriUtils.java#L193}
|
||||||
*/
|
*/
|
||||||
public class ShareActivity extends SyncthingActivity
|
public class ShareActivity extends SyncthingActivity
|
||||||
implements SyncthingActivity.OnServiceConnectedListener, SyncthingService.OnServiceStateChangeListener {
|
implements SyncthingService.OnServiceStateChangeListener {
|
||||||
|
|
||||||
private static final String TAG = "ShareActivity";
|
private static final String TAG = "ShareActivity";
|
||||||
private static final String PREF_PREVIOUSLY_SELECTED_SYNCTHING_FOLDER = "previously_selected_syncthing_folder";
|
private static final String PREF_PREVIOUSLY_SELECTED_SYNCTHING_FOLDER = "previously_selected_syncthing_folder";
|
||||||
|
|
||||||
public static final String PREF_FOLDER_SAVED_SUBDIRECTORY = "saved_sub_directory_";
|
public static final String PREF_FOLDER_SAVED_SUBDIRECTORY = "saved_sub_directory_";
|
||||||
|
|
||||||
private TextView mSubDirectoryTextView;
|
private ConfigRouter mConfig;
|
||||||
|
|
||||||
private Spinner mFoldersSpinner;
|
private Spinner mFoldersSpinner;
|
||||||
|
|
||||||
|
private SyncthingService mSyncthingService = null;
|
||||||
|
|
||||||
|
private TextView mSubDirectoryTextView;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
|
||||||
|
super.onServiceConnected(componentName, iBinder);
|
||||||
|
SyncthingServiceBinder syncthingServiceBinder = (SyncthingServiceBinder) iBinder;
|
||||||
|
SyncthingService syncthingService = (SyncthingService) syncthingServiceBinder.getService();
|
||||||
|
syncthingService.registerOnServiceStateChangeListener(ShareActivity.this);
|
||||||
|
mSyncthingService = syncthingService;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onServiceStateChange(SyncthingService.State currentState) {
|
public void onServiceStateChange(SyncthingService.State currentState) {
|
||||||
if (currentState != SyncthingService.State.ACTIVE || getApi() == null)
|
List<Folder> folders = mConfig.getFolders(getApi());
|
||||||
return;
|
|
||||||
|
|
||||||
List<Folder> folders = getApi().getFolders();
|
|
||||||
|
|
||||||
// Get the index of the previously selected folder.
|
// Get the index of the previously selected folder.
|
||||||
int folderIndex = 0;
|
int folderIndex = 0;
|
||||||
|
@ -84,11 +99,6 @@ public class ShareActivity extends SyncthingActivity
|
||||||
sItems.setSelection(folderIndex);
|
sItems.setSelection(folderIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onServiceConnected() {
|
|
||||||
getService().registerOnServiceStateChangeListener(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPostCreate(Bundle savedInstanceState) {
|
protected void onPostCreate(Bundle savedInstanceState) {
|
||||||
super.onPostCreate(savedInstanceState);
|
super.onPostCreate(savedInstanceState);
|
||||||
|
@ -100,10 +110,9 @@ public class ShareActivity extends SyncthingActivity
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
mConfig = new ConfigRouter(ShareActivity.this);
|
||||||
setContentView(R.layout.activity_share);
|
setContentView(R.layout.activity_share);
|
||||||
|
|
||||||
registerOnServiceConnectedListener(this);
|
|
||||||
|
|
||||||
Button mShareButton = findViewById(R.id.share_button);
|
Button mShareButton = findViewById(R.id.share_button);
|
||||||
Button mCancelButton = findViewById(R.id.cancel_button);
|
Button mCancelButton = findViewById(R.id.cancel_button);
|
||||||
Button browseButton = findViewById(R.id.browse_button);
|
Button browseButton = findViewById(R.id.browse_button);
|
||||||
|
@ -113,7 +122,6 @@ public class ShareActivity extends SyncthingActivity
|
||||||
mSubDirectoryTextView = findViewById(R.id.sub_directory_Textview);
|
mSubDirectoryTextView = findViewById(R.id.sub_directory_Textview);
|
||||||
mFoldersSpinner = findViewById(R.id.folders);
|
mFoldersSpinner = findViewById(R.id.folders);
|
||||||
|
|
||||||
// TODO: add support for EXTRA_TEXT (notes, memos sharing)
|
|
||||||
ArrayList<Uri> extrasToCopy = new ArrayList<>();
|
ArrayList<Uri> extrasToCopy = new ArrayList<>();
|
||||||
if (getIntent().getAction().equals(Intent.ACTION_SEND)) {
|
if (getIntent().getAction().equals(Intent.ACTION_SEND)) {
|
||||||
Uri uri = getIntent().getParcelableExtra(Intent.EXTRA_STREAM);
|
Uri uri = getIntent().getParcelableExtra(Intent.EXTRA_STREAM);
|
||||||
|
@ -179,6 +187,42 @@ public class ShareActivity extends SyncthingActivity
|
||||||
mSubDirectoryTextView.setText(getSavedSubDirectory());
|
mSubDirectoryTextView.setText(getSavedSubDirectory());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onPause() {
|
||||||
|
super.onPause();
|
||||||
|
if (mFoldersSpinner.getSelectedItem() != null) {
|
||||||
|
Folder selectedFolder = (Folder) mFoldersSpinner.getSelectedItem();
|
||||||
|
PreferenceManager.getDefaultSharedPreferences(this).edit()
|
||||||
|
.putString(PREF_PREVIOUSLY_SELECTED_SYNCTHING_FOLDER, selectedFolder.id)
|
||||||
|
.apply();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||||
|
super.onActivityResult(requestCode, resultCode, data);
|
||||||
|
if (requestCode == FolderPickerActivity.DIRECTORY_REQUEST_CODE && resultCode == RESULT_OK) {
|
||||||
|
Folder selectedFolder = (Folder) mFoldersSpinner.getSelectedItem();
|
||||||
|
String folderDirectory = Util.formatPath(selectedFolder.path);
|
||||||
|
String subDirectory = data.getStringExtra(FolderPickerActivity.EXTRA_RESULT_DIRECTORY);
|
||||||
|
//Remove the parent directory from the string, so it is only the Sub directory that is displayed to the user.
|
||||||
|
subDirectory = subDirectory.replace(folderDirectory, "");
|
||||||
|
mSubDirectoryTextView.setText(subDirectory);
|
||||||
|
|
||||||
|
PreferenceManager.getDefaultSharedPreferences(this)
|
||||||
|
.edit().putString(PREF_FOLDER_SAVED_SUBDIRECTORY + selectedFolder.id, subDirectory)
|
||||||
|
.apply();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDestroy() {
|
||||||
|
if (mSyncthingService != null) {
|
||||||
|
mSyncthingService.unregisterOnServiceStateChangeListener(ShareActivity.this);
|
||||||
|
}
|
||||||
|
super.onDestroy();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate file name for new file.
|
* Generate file name for new file.
|
||||||
*/
|
*/
|
||||||
|
@ -357,32 +401,4 @@ public class ShareActivity extends SyncthingActivity
|
||||||
shareActivity.finish();
|
shareActivity.finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onPause() {
|
|
||||||
super.onPause();
|
|
||||||
if (mFoldersSpinner.getSelectedItem() != null) {
|
|
||||||
Folder selectedFolder = (Folder) mFoldersSpinner.getSelectedItem();
|
|
||||||
PreferenceManager.getDefaultSharedPreferences(this).edit()
|
|
||||||
.putString(PREF_PREVIOUSLY_SELECTED_SYNCTHING_FOLDER, selectedFolder.id)
|
|
||||||
.apply();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
|
||||||
super.onActivityResult(requestCode, resultCode, data);
|
|
||||||
if (requestCode == FolderPickerActivity.DIRECTORY_REQUEST_CODE && resultCode == RESULT_OK) {
|
|
||||||
Folder selectedFolder = (Folder) mFoldersSpinner.getSelectedItem();
|
|
||||||
String folderDirectory = Util.formatPath(selectedFolder.path);
|
|
||||||
String subDirectory = data.getStringExtra(FolderPickerActivity.EXTRA_RESULT_DIRECTORY);
|
|
||||||
//Remove the parent directory from the string, so it is only the Sub directory that is displayed to the user.
|
|
||||||
subDirectory = subDirectory.replace(folderDirectory, "");
|
|
||||||
mSubDirectoryTextView.setText(subDirectory);
|
|
||||||
|
|
||||||
PreferenceManager.getDefaultSharedPreferences(this)
|
|
||||||
.edit().putString(PREF_FOLDER_SAVED_SUBDIRECTORY + selectedFolder.id, subDirectory)
|
|
||||||
.apply();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ import android.os.Bundle;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
import android.support.v7.widget.Toolbar;
|
import android.support.v7.widget.Toolbar;
|
||||||
|
// import android.util.Log;
|
||||||
|
|
||||||
import com.annimon.stream.Stream;
|
import com.annimon.stream.Stream;
|
||||||
import com.nutomic.syncthingandroid.R;
|
import com.nutomic.syncthingandroid.R;
|
||||||
|
@ -22,17 +23,10 @@ import java.util.LinkedList;
|
||||||
*/
|
*/
|
||||||
public abstract class SyncthingActivity extends AppCompatActivity implements ServiceConnection {
|
public abstract class SyncthingActivity extends AppCompatActivity implements ServiceConnection {
|
||||||
|
|
||||||
|
private static final String TAG = "SyncthingActivity";
|
||||||
|
|
||||||
private SyncthingService mSyncthingService;
|
private SyncthingService mSyncthingService;
|
||||||
|
|
||||||
private final LinkedList<OnServiceConnectedListener> mServiceConnectedListeners = new LinkedList<>();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* To be used for Fragments.
|
|
||||||
*/
|
|
||||||
public interface OnServiceConnectedListener {
|
|
||||||
void onServiceConnected();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Look for a Toolbar in the layout and bind it as the activity's actionbar with reasonable
|
* Look for a Toolbar in the layout and bind it as the activity's actionbar with reasonable
|
||||||
* defaults.
|
* defaults.
|
||||||
|
@ -69,8 +63,6 @@ public abstract class SyncthingActivity extends AppCompatActivity implements Ser
|
||||||
public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
|
public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
|
||||||
SyncthingServiceBinder syncthingServiceBinder = (SyncthingServiceBinder) iBinder;
|
SyncthingServiceBinder syncthingServiceBinder = (SyncthingServiceBinder) iBinder;
|
||||||
mSyncthingService = syncthingServiceBinder.getService();
|
mSyncthingService = syncthingServiceBinder.getService();
|
||||||
Stream.of(mServiceConnectedListeners).forEach(OnServiceConnectedListener::onServiceConnected);
|
|
||||||
mServiceConnectedListeners.clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -78,17 +70,6 @@ public abstract class SyncthingActivity extends AppCompatActivity implements Ser
|
||||||
mSyncthingService = null;
|
mSyncthingService = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Used for Fragments to use the Activity's service connection.
|
|
||||||
*/
|
|
||||||
void registerOnServiceConnectedListener(OnServiceConnectedListener listener) {
|
|
||||||
if (mSyncthingService != null) {
|
|
||||||
listener.onServiceConnected();
|
|
||||||
} else {
|
|
||||||
mServiceConnectedListeners.addLast(listener);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns service object (or null if not bound).
|
* Returns service object (or null if not bound).
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -322,7 +322,7 @@ public class SyncthingService extends Service {
|
||||||
* This is the moment, when the reset delta index work was completed and Web UI came up.
|
* This is the moment, when the reset delta index work was completed and Web UI came up.
|
||||||
* 3.2 The shutdown gets deferred until State.ACTIVE was reached and then syncthing native will
|
* 3.2 The shutdown gets deferred until State.ACTIVE was reached and then syncthing native will
|
||||||
* be shutdown synchronously.
|
* be shutdown synchronously.
|
||||||
*/
|
*/
|
||||||
Log.i(TAG, "Invoking reset of delta indexes");
|
Log.i(TAG, "Invoking reset of delta indexes");
|
||||||
if (mCurrentState != State.DISABLED) {
|
if (mCurrentState != State.DISABLED) {
|
||||||
// Shutdown synchronously.
|
// Shutdown synchronously.
|
||||||
|
@ -756,8 +756,10 @@ public class SyncthingService extends Service {
|
||||||
Boolean failSuccess = true;
|
Boolean failSuccess = true;
|
||||||
Log.v(TAG, "exportConfig BEGIN");
|
Log.v(TAG, "exportConfig BEGIN");
|
||||||
|
|
||||||
// Shutdown synchronously.
|
if (mCurrentState != State.DISABLED) {
|
||||||
shutdown(State.DISABLED);
|
// Shutdown synchronously.
|
||||||
|
shutdown(State.DISABLED);
|
||||||
|
}
|
||||||
|
|
||||||
// Copy config, privateKey and/or publicKey to export path.
|
// Copy config, privateKey and/or publicKey to export path.
|
||||||
Constants.EXPORT_PATH_OBJ.mkdirs();
|
Constants.EXPORT_PATH_OBJ.mkdirs();
|
||||||
|
@ -858,8 +860,10 @@ public class SyncthingService extends Service {
|
||||||
Boolean failSuccess = true;
|
Boolean failSuccess = true;
|
||||||
Log.v(TAG, "importConfig BEGIN");
|
Log.v(TAG, "importConfig BEGIN");
|
||||||
|
|
||||||
// Shutdown synchronously.
|
if (mCurrentState != State.DISABLED) {
|
||||||
shutdown(State.DISABLED);
|
// Shutdown synchronously.
|
||||||
|
shutdown(State.DISABLED);
|
||||||
|
}
|
||||||
|
|
||||||
// Import config, privateKey and/or publicKey.
|
// Import config, privateKey and/or publicKey.
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -288,9 +288,6 @@
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">Избор на папка</string>
|
<string name="folder_picker_title">Избор на папка</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">Внимание: Версията на Android не позволява синхронизиране с външни устройства за съхранение на данни</string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">Директорията е празна</string>
|
<string name="directory_empty">Директорията е празна</string>
|
||||||
|
|
||||||
|
|
|
@ -543,9 +543,6 @@ Ens podeu informar dels problemes que trobeu a través de Github.</string>
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">Selector de carpetes</string>
|
<string name="folder_picker_title">Selector de carpetes</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">Avís: la vostra versió de l\'Android no us permet sincronitzar a dispositius d\'emmagatzematge externs</string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">El directori és buit</string>
|
<string name="directory_empty">El directori és buit</string>
|
||||||
|
|
||||||
|
|
|
@ -334,9 +334,6 @@ Všechny zaznamenané chyby prosím hlašte přes Github.</string>
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">Výběr adresáře</string>
|
<string name="folder_picker_title">Výběr adresáře</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">Varování: Tato verze Androidu nepovoluje synchronizaci na externí úložiště</string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">Adresář je prázdný</string>
|
<string name="directory_empty">Adresář je prázdný</string>
|
||||||
|
|
||||||
|
|
|
@ -330,9 +330,6 @@ Vær venlig at rapportere ethvert problem, du støder på, via Github. </string>
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">Mappe Vælger</string>
|
<string name="folder_picker_title">Mappe Vælger</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">Advarsel: Din Android version tillader ikke at synkronisere til eksterne lagringsenheder</string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">Katalog er Tomt</string>
|
<string name="directory_empty">Katalog er Tomt</string>
|
||||||
|
|
||||||
|
|
|
@ -565,9 +565,6 @@ Bitte melden Sie auftretende Probleme via GitHub.</string>
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">Verzeichnisauswahl</string>
|
<string name="folder_picker_title">Verzeichnisauswahl</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">Warnung: Deine Andoid-Version erlaubt kein Synchronisieren auf externe Datenträger</string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">Verzeichnis ist leer</string>
|
<string name="directory_empty">Verzeichnis ist leer</string>
|
||||||
|
|
||||||
|
|
|
@ -330,9 +330,6 @@
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">Επιλογέας φακέλων</string>
|
<string name="folder_picker_title">Επιλογέας φακέλων</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">Προσοχή: η έκδοση του Android σας δεν επιτρέπει τον συγχρονισμό προς εξωτερικές συσκευές αποθήκευσης</string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">Ο φάκελος είναι κενός</string>
|
<string name="directory_empty">Ο φάκελος είναι κενός</string>
|
||||||
|
|
||||||
|
|
|
@ -262,9 +262,6 @@
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">Seleccionador de Carpetas</string>
|
<string name="folder_picker_title">Seleccionador de Carpetas</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">Advertencia: Su versión de Android no permite sincronizar con dispositivos de almacenamiento externo</string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">El directorio está vacío</string>
|
<string name="directory_empty">El directorio está vacío</string>
|
||||||
|
|
||||||
|
|
|
@ -299,9 +299,6 @@
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">Seleccionador de carpetas</string>
|
<string name="folder_picker_title">Seleccionador de carpetas</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">Aviso: Tu versión de Android no permite la sincronización con dispositivos de almacenamiento externos</string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">El directorio esta vacío</string>
|
<string name="directory_empty">El directorio esta vacío</string>
|
||||||
|
|
||||||
|
|
|
@ -314,9 +314,6 @@ Ilmoitathan ystävällisesti kaikista havaitsemistasi ongelmista Githubin kautta
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">Kansionvalitsin</string>
|
<string name="folder_picker_title">Kansionvalitsin</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">Varoitus: Käytössä oleva Android-versio ei salli synkronointia ulkoisille massamuisteille.</string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">Hakemisto on tyhjä</string>
|
<string name="directory_empty">Hakemisto on tyhjä</string>
|
||||||
|
|
||||||
|
|
|
@ -396,9 +396,6 @@ S\'il vous plaît, soumettez les problèmes que vous rencontrez via Github.</str
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">Sélection du répertoire</string>
|
<string name="folder_picker_title">Sélection du répertoire</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">Attention: votre version Android n\'autorise pas la synchronisation avec des périphériques de stockages externes.</string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">Le répertoire est vide</string>
|
<string name="directory_empty">Le répertoire est vide</string>
|
||||||
|
|
||||||
|
|
|
@ -392,9 +392,6 @@ VIGYÁZAT! Más alkalmazások kiolvashatják a backupból a titkos kulcsot, és
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">Mappaválasztó</string>
|
<string name="folder_picker_title">Mappaválasztó</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">Figyelem: Az általad használt Android verzió nem támogatja a külső eszközre (pl. memóriakártyára) történő szinkronizálást</string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">A mappa üres</string>
|
<string name="directory_empty">A mappa üres</string>
|
||||||
|
|
||||||
|
|
|
@ -311,9 +311,6 @@ Jika ada masalah silakan laporkan lewat Github.</string>
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">Pemilih Folder</string>
|
<string name="folder_picker_title">Pemilih Folder</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">Peringatan: Versi Android anda tidak mengijinkan penyelarasan ke perangkat storage eksternal</string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">Direktori ini Kosong</string>
|
<string name="directory_empty">Direktori ini Kosong</string>
|
||||||
|
|
||||||
|
|
|
@ -393,9 +393,6 @@ Si prega di segnalare eventuali problemi che si incontrano via Github.</string>
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">Selezione Cartella</string>
|
<string name="folder_picker_title">Selezione Cartella</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">Attenzione: La tua versione di Android non permette la sincronizzazione con dispositivi esterni di archiviazione</string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">Cartella Vuota</string>
|
<string name="directory_empty">Cartella Vuota</string>
|
||||||
|
|
||||||
|
|
|
@ -331,9 +331,6 @@
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">フォルダーを選択</string>
|
<string name="folder_picker_title">フォルダーを選択</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">警告: お使いの Android のバージョンは外部ストレージに同期することができません</string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">ディレクトリーは空です</string>
|
<string name="directory_empty">ディレクトリーは空です</string>
|
||||||
|
|
||||||
|
|
|
@ -329,9 +329,6 @@
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">폴더 선택기</string>
|
<string name="folder_picker_title">폴더 선택기</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">경고: 사용하는 Android 버전에서는 외부 저장소에의 동기화를 지원하지 않습니다</string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">디렉토리가 비어 있습니다</string>
|
<string name="directory_empty">디렉토리가 비어 있습니다</string>
|
||||||
|
|
||||||
|
|
|
@ -271,9 +271,6 @@
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">Mappe-velger</string>
|
<string name="folder_picker_title">Mappe-velger</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">Advarsel: Din versjon av Android tillater ikke synkronisering til eksterne lagringsenheter. </string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">Katalogen er tom</string>
|
<string name="directory_empty">Katalogen er tom</string>
|
||||||
|
|
||||||
|
|
|
@ -415,9 +415,6 @@ Als je problemen tegenkomt, meld ze dan via GitHub.</string>
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">Mapkiezer</string>
|
<string name="folder_picker_title">Mapkiezer</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">Waarschuwing: je Android-versie laat synchroniseren naar externe opslagapparaten niet toe</string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">Map is leeg</string>
|
<string name="directory_empty">Map is leeg</string>
|
||||||
|
|
||||||
|
|
|
@ -271,9 +271,6 @@
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">Mappeveljar</string>
|
<string name="folder_picker_title">Mappeveljar</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">Åtvaring: Din versjon av Android tillèt ikkje synkronisering av eksterne lagringseiningar. </string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">Mappa er tom</string>
|
<string name="directory_empty">Mappa er tom</string>
|
||||||
|
|
||||||
|
|
|
@ -334,9 +334,6 @@ Proszę zgłaszać napotkane błędy programu za pośrednictwem serwisu Github.<
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">Wybieranie katalogu</string>
|
<string name="folder_picker_title">Wybieranie katalogu</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">Ostrzeżenie: aktualna wersja systemu Android nie pozwala na synchronizowanie zewnętrznych pamięci masowych</string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">Katalog jest pusty</string>
|
<string name="directory_empty">Katalog jest pusty</string>
|
||||||
|
|
||||||
|
|
|
@ -375,9 +375,6 @@ Por favor, nos avise sobre quaisquer problemas que você encontrar via Github.</
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">Seletor de pasta</string>
|
<string name="folder_picker_title">Seletor de pasta</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">Aviso: a versão do seu Android não suporta sincronização de dispositivos externos de armazenamento</string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">A pasta está vazia</string>
|
<string name="directory_empty">A pasta está vazia</string>
|
||||||
|
|
||||||
|
|
|
@ -297,9 +297,6 @@ Reporte, através do Github, quaisquer problemas que encontre, por favor.</strin
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">Selector de pasta</string>
|
<string name="folder_picker_title">Selector de pasta</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">Aviso: A sua versão de Android não permite sincronizar com dispositivos de armazenamento externo</string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">A pasta está vazia</string>
|
<string name="directory_empty">A pasta está vazia</string>
|
||||||
|
|
||||||
|
|
|
@ -425,9 +425,6 @@ Vă rugăm să raportați orice problemă întâlniți, prin intermediul GitHub.
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">Selector de director</string>
|
<string name="folder_picker_title">Selector de director</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">Atenție: Versiunea dumneavoastră de Android nu permite sincronizarea la locațiile de stocare externe</string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">Directorul este gol</string>
|
<string name="directory_empty">Directorul este gol</string>
|
||||||
|
|
||||||
|
|
|
@ -451,9 +451,6 @@
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">Выбор Папки</string>
|
<string name="folder_picker_title">Выбор Папки</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">Внимание: Ваша версия Android не позволяет синхронизацию на внешние хранилища</string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">Папка пуста</string>
|
<string name="directory_empty">Папка пуста</string>
|
||||||
|
|
||||||
|
|
|
@ -240,9 +240,6 @@
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">Výver Adresára</string>
|
<string name="folder_picker_title">Výver Adresára</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">Varovanie: Verzia Androidu na Vašom zariadení nedovoľuje synchronizáciu externého úložiska</string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">Adresár je Prázdny</string>
|
<string name="directory_empty">Adresár je Prázdny</string>
|
||||||
|
|
||||||
|
|
|
@ -510,9 +510,6 @@ Vänligen rapportera eventuella problem du stöter på via Github.</string>
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">Mappväljare</string>
|
<string name="folder_picker_title">Mappväljare</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">Varning: Din Android version tillåter inte synkronisering till externa lagringsenheter</string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">Katalogen är tom</string>
|
<string name="directory_empty">Katalogen är tom</string>
|
||||||
|
|
||||||
|
|
|
@ -288,9 +288,6 @@ Eğer herhangi bir sorunla karşılaşırsan Github aracılığıyla bildir.</st
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">Klasör Seçici</string>
|
<string name="folder_picker_title">Klasör Seçici</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">Uyarı: Android sürümünüz, harici depolama aygıtlarına eşzamanlama yapılmasına izin vermiyor.</string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">Dizin Boş</string>
|
<string name="directory_empty">Dizin Boş</string>
|
||||||
|
|
||||||
|
|
|
@ -262,9 +262,6 @@
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">Trình chọn th.mục</string>
|
<string name="folder_picker_title">Trình chọn th.mục</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">Cảnh báo: Ph.bản Android của bạn không cho phép đ.bộ vào các th.bị lưu trữ ngoại vi</string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">Thư mục rỗng</string>
|
<string name="directory_empty">Thư mục rỗng</string>
|
||||||
|
|
||||||
|
|
|
@ -333,9 +333,6 @@
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">文件夹选择器</string>
|
<string name="folder_picker_title">文件夹选择器</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">警告:您的系统版本不允许同步文件至外部存储器</string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">目录为空</string>
|
<string name="directory_empty">目录为空</string>
|
||||||
|
|
||||||
|
|
|
@ -329,9 +329,6 @@
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">資料夾選擇器</string>
|
<string name="folder_picker_title">資料夾選擇器</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">警告:你的 Android 版本不允許同步外部儲存裝置</string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">資料夾為空</string>
|
<string name="directory_empty">資料夾為空</string>
|
||||||
|
|
||||||
|
|
|
@ -573,9 +573,6 @@ Please report any problems you encounter via Github.</string>
|
||||||
<!-- Activity title -->
|
<!-- Activity title -->
|
||||||
<string name="folder_picker_title">Folder Picker</string>
|
<string name="folder_picker_title">Folder Picker</string>
|
||||||
|
|
||||||
<!-- Toast shown on devices with kitkat or higher -->
|
|
||||||
<string name="kitkat_external_storage_warning">Warning: Your Android version does not allow syncing to external storage devices</string>
|
|
||||||
|
|
||||||
<!-- ListView empty text -->
|
<!-- ListView empty text -->
|
||||||
<string name="directory_empty">Directory is Empty</string>
|
<string name="directory_empty">Directory is Empty</string>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue