1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-26 06:11:19 +00:00

Fix typos (#236)

This commit is contained in:
Catfriend1 2019-01-18 23:26:57 +01:00 committed by GitHub
parent 1154fc021e
commit 495c3e9eb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 21 additions and 21 deletions

View file

@ -69,7 +69,7 @@ public class TipsAndTricksActivity extends SyncthingActivity {
mTipListAdapter.add(getString(R.string.tip_huawei_device_disconnected_title), getString(R.string.tip_huawei_device_disconnected_text, ipAddress));
}
// Tips referring to Xiaomi deviecs.
// Tips referring to Xiaomi devices.
if ("xiaomi".equalsIgnoreCase(Build.MANUFACTURER)) {
mTipListAdapter.add(getString(R.string.tip_xiaomi_autostart_title), getString(R.string.tip_xiaomi_autostart_text));
}

View file

@ -89,7 +89,7 @@ public class VersioningDialogActivity extends AppCompatActivity {
mCurrentFragment = getFragment(selection);
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
//This Activtiy (VersioningDialogActivity) contains all the file versioning parameters that have been passed from the FolderActivity in the intent extras, so we simply
// This Activity (VersioningDialogActivity) contains all the file versioning parameters that have been passed from the FolderActivity in the intent extras, so we simply
// pass that to the currentfragment.
mCurrentFragment.setArguments(mArguments);
transaction.replace(R.id.versioningFragmentContainer, mCurrentFragment);

View file

@ -264,8 +264,8 @@ public class WebGuiActivity extends SyncthingActivity
properties.setProperty("https.nonProxyHosts", exclusionList);
try {
Class applictionCls = Class.forName("android.app.Application");
Field loadedApkField = applictionCls.getDeclaredField("mLoadedApk");
Class applicationCls = Class.forName("android.app.Application");
Field loadedApkField = applicationCls.getDeclaredField("mLoadedApk");
loadedApkField.setAccessible(true);
Object loadedApk = loadedApkField.get(appContext);
Class loadedApkCls = Class.forName("android.app.LoadedApk");

View file

@ -119,7 +119,7 @@ public class DrawerFragment extends Fragment implements SyncthingService.OnServi
}
private void updateUI() {
Boolean synthingRunning = mServiceState == SyncthingService.State.ACTIVE;
Boolean syncthingRunning = mServiceState == SyncthingService.State.ACTIVE;
// Update static info labels.
if (sharedPreferences != null && mVersion != null) {
@ -128,10 +128,10 @@ public class DrawerFragment extends Fragment implements SyncthingService.OnServi
// Update action button availability. Show buttons if syncthing is running.
mVersion.setVisibility(View.VISIBLE);
mDrawerActionShowQrCode.setVisibility(synthingRunning ? View.VISIBLE : View.GONE);
mDrawerRecentChanges.setVisibility(synthingRunning ? View.VISIBLE : View.GONE);
mDrawerActionWebGui.setVisibility(synthingRunning ? View.VISIBLE : View.GONE);
mDrawerActionRestart.setVisibility(synthingRunning ? View.VISIBLE : View.GONE);
mDrawerActionShowQrCode.setVisibility(syncthingRunning ? View.VISIBLE : View.GONE);
mDrawerRecentChanges.setVisibility(syncthingRunning ? View.VISIBLE : View.GONE);
mDrawerActionWebGui.setVisibility(syncthingRunning ? View.VISIBLE : View.GONE);
mDrawerActionRestart.setVisibility(syncthingRunning ? View.VISIBLE : View.GONE);
mDrawerTipsAndTricks.setVisibility(View.VISIBLE);
mDrawerActionExit.setVisibility(View.VISIBLE);
}
@ -149,7 +149,7 @@ public class DrawerFragment extends Fragment implements SyncthingService.OnServi
String apiKey = restApi.getGui().apiKey;
String deviceId = restApi.getLocalDevice().deviceID;
URL url = restApi.getUrl();
//The QRCode request takes one paramteer called "text", which is the text to be converted to a QRCode.
// The QRCode request takes one parameter called "text", which is the text to be converted to a QRCode.
new ImageGetRequest(mActivity, url, ImageGetRequest.QR_CODE_GENERATOR, apiKey,
ImmutableMap.of("text", deviceId),qrCodeBitmap -> {
mActivity.showQrCodeDialog(deviceId, qrCodeBitmap);

View file

@ -27,7 +27,7 @@ public class NumberPickerFragment extends Fragment {
return mNumberPicker;
}
public void setOnValueChangedLisenter(NumberPicker.OnValueChangeListener onValueChangeListener){
public void setOnValueChangedListener(NumberPicker.OnValueChangeListener onValueChangeListener){
mNumberPicker.setOnValueChangedListener(onValueChangeListener);
}

View file

@ -28,7 +28,7 @@ public class ExternalVersioningFragment extends Fragment {
mView = inflater.inflate(R.layout.fragment_external_versioning, container, false);
mArguments = getArguments();
fillArguments();
initateTextView();
initTextView();
return mView;
}
@ -42,7 +42,7 @@ public class ExternalVersioningFragment extends Fragment {
return !mArguments.containsKey("command");
}
private void initateTextView() {
private void initTextView() {
TextView commandTextView = mView.findViewById(R.id.commandTextView);
commandTextView.setText(getCommand());

View file

@ -42,7 +42,7 @@ public class SimpleVersioningFragment extends Fragment {
private void updateNumberPicker() {
NumberPickerFragment numberPicker = (NumberPickerFragment) getChildFragmentManager().findFragmentByTag("numberpicker_simple_versioning");
numberPicker.updateNumberPicker(100000, 1, getKeepVersions());
numberPicker.setOnValueChangedLisenter((picker, oldVal, newVal) -> updateKeepVersions((String.valueOf(newVal))));
numberPicker.setOnValueChangedListener((picker, oldVal, newVal) -> updateKeepVersions((String.valueOf(newVal))));
}
private void updateKeepVersions(String newValue) {

View file

@ -56,7 +56,7 @@ public class StaggeredVersioningFragment extends Fragment {
private void updateNumberPicker() {
NumberPickerFragment numberPicker = (NumberPickerFragment) getChildFragmentManager().findFragmentByTag("numberpicker_staggered_versioning");
numberPicker.updateNumberPicker(100, 0, getMaxAgeInDays());
numberPicker.setOnValueChangedLisenter((picker, oldVal, newVal) -> updatePreference("maxAge", (String.valueOf(TimeUnit.DAYS.toSeconds(newVal)))));
numberPicker.setOnValueChangedListener((picker, oldVal, newVal) -> updatePreference("maxAge", (String.valueOf(TimeUnit.DAYS.toSeconds(newVal)))));
}
private void initiateVersionsPathTextView() {

View file

@ -42,7 +42,7 @@ public class TrashCanVersioningFragment extends Fragment {
private void updateNumberPicker() {
NumberPickerFragment numberPicker = (NumberPickerFragment) getChildFragmentManager().findFragmentByTag("numberpicker_trashcan_versioning");
numberPicker.updateNumberPicker(100, 0, getCleanoutDays());
numberPicker.setOnValueChangedLisenter((picker, oldVal, newVal) -> updateCleanoutDays((String.valueOf(newVal))));
numberPicker.setOnValueChangedListener((picker, oldVal, newVal) -> updateCleanoutDays((String.valueOf(newVal))));
}
private int getCleanoutDays() {

View file

@ -42,7 +42,7 @@ public class EventProcessor implements Runnable, RestApi.OnReceiveEventListener
/**
* Minimum interval in seconds at which the events are polled from syncthing and processed.
* This intervall will not wake up the device to save battery power.
* This interval will not wake up the device to save battery power.
*/
private static final long EVENT_UPDATE_INTERVAL = TimeUnit.SECONDS.toMillis(15);
@ -131,7 +131,7 @@ public class EventProcessor implements Runnable, RestApi.OnReceiveEventListener
String folderId = (String) event.data.get("folder");
String relativeFilePath = (String) event.data.get("item");
// Lookup folder.path for the given folder.id if all fields were containted in the event.data.
// Lookup folder.path for the given folder.id if all fields were contained in the event.data.
String folderPath = null;
if (!TextUtils.isEmpty(action) &&
!TextUtils.isEmpty(folderId) &&

View file

@ -632,7 +632,7 @@ public class SyncthingService extends Service {
if (mStoragePermissionGranted) {
synchronized (mStateLock) {
if (mCurrentState == State.STARTING) {
Log.i(TAG, "Delay shutting down synchting binary until initialisation finished");
Log.i(TAG, "Delay shutting down syncthing binary until initialisation finished");
mDestroyScheduled = true;
} else {
Log.i(TAG, "Shutting down syncthing binary immediately");

View file

@ -85,7 +85,7 @@ public class Util {
* Normally an application's data directory is only accessible by the corresponding application.
* Therefore, every file and directory is owned by an application's user and group. When running Syncthing as root,
* it writes to the application's data directory. This leaves files and directories behind which are owned by root having 0600.
* Moreover, those acitons performed as root changes a file's type in terms of SELinux.
* Moreover, those actions performed as root changes a file's type in terms of SELinux.
* A subsequent start of Syncthing will fail due to insufficient permissions.
* Hence, this method fixes the owner, group and the files' type of the data directory.
*
@ -95,7 +95,7 @@ public class Util {
// We can safely assume that root magic is somehow available, because readConfig and saveChanges check for
// read and write access before calling us.
// Be paranoid :) and check if root is available.
// Ignore the 'use_root' preference, because we might want to fix ther permission
// Ignore the 'use_root' preference, because we might want to fix the permission
// just after the root option has been disabled.
if (!Shell.SU.available()) {
Log.e(TAG, "Root is not available. Cannot fix permissions.");