Migrating to Android SDK v22, typos fixed

This commit is contained in:
Aleksander Nowakowski
2015-03-16 12:36:56 +01:00
parent b0a078fe4f
commit c666059593
23 changed files with 42 additions and 37 deletions

View File

@@ -204,7 +204,7 @@ public class CSCService extends BleProfileService implements CSCManagerCallbacks
final Intent disconnect = new Intent(ACTION_DISCONNECT);
final PendingIntent disconnectAction = PendingIntent.getBroadcast(this, DISCONNECT_REQ, disconnect, PendingIntent.FLAG_UPDATE_CURRENT);
// both activities above have launchMode="singleTask" in the AndoridManifest.xml file, so if the task is already running, it will be resumed
// both activities above have launchMode="singleTask" in the AndroidManifest.xml file, so if the task is already running, it will be resumed
final PendingIntent pendingIntent = PendingIntent.getActivities(this, OPEN_ACTIVITY_REQ, new Intent[] { parentIntent, targetIntent }, PendingIntent.FLAG_UPDATE_CURRENT);
final Notification.Builder builder = new Notification.Builder(this).setContentIntent(pendingIntent);
builder.setContentTitle(getString(R.string.app_name)).setContentText(getString(messageResId, getDeviceName()));

View File

@@ -130,13 +130,13 @@ public class ExpandableRecordAdapter extends BaseExpandableListAdapter {
final int status = record.status;
for (int i = 0; i < 12; ++i)
if ((status & (1 << i)) > 0)
builder.append(resources.getStringArray(R.array.gls_status_annunciatioin)[i]).append("\n");
builder.append(resources.getStringArray(R.array.gls_status_annunciation)[i]).append("\n");
builder.setLength(builder.length() - 1);
return new Pair<>(resources.getString(R.string.gls_status_annunciatioin_title), builder.toString());
return new Pair<>(resources.getString(R.string.gls_status_annunciation_title), builder.toString());
}
case 2: { // carbohydrate id and unit
final StringBuilder builder = new StringBuilder();
builder.append(resources.getStringArray(R.array.gls_context_carbohydrare)[record.context.carbohydrateId]).append(" (" + record.context.carbohydrateUnits + " kg)");
builder.append(resources.getStringArray(R.array.gls_context_carbohydrare)[record.context.carbohydrateId]).append(" (").append(record.context.carbohydrateUnits).append(" kg)");
return new Pair<>(resources.getString(R.string.gls_context_carbohydrare_title), builder.toString());
}
case 3: { // meal

View File

@@ -133,7 +133,7 @@ public class HTSService extends BleProfileService implements HTSManagerCallbacks
final Intent disconnect = new Intent(ACTION_DISCONNECT);
final PendingIntent disconnectAction = PendingIntent.getBroadcast(this, DISCONNECT_REQ, disconnect, PendingIntent.FLAG_UPDATE_CURRENT);
// both activities above have launchMode="singleTask" in the AndoridManifest.xml file, so if the task is already running, it will be resumed
// both activities above have launchMode="singleTask" in the AndroidManifest.xml file, so if the task is already running, it will be resumed
final PendingIntent pendingIntent = PendingIntent.getActivities(this, OPEN_ACTIVITY_REQ, new Intent[] { parentIntent, targetIntent }, PendingIntent.FLAG_UPDATE_CURRENT);
final Notification.Builder builder = new Notification.Builder(this).setContentIntent(pendingIntent);
builder.setContentTitle(getString(R.string.app_name)).setContentText(getString(messageResId, getDeviceName()));

View File

@@ -57,7 +57,7 @@ public class RSCMeasurementParser {
}
final StringBuilder builder = new StringBuilder();
builder.append(String.format("Speed: %.2f m/s, Candence: %d RPM,\n", instantaneousSpeed, instantaneousCadence));
builder.append(String.format("Speed: %.2f m/s, Cadence: %d RPM,\n", instantaneousSpeed, instantaneousCadence));
if (islmPresent)
builder.append(String.format("Instantaneous Stride Length: %.2f m,\n", instantaneousStrideLength));
if (tdPreset)

View File

@@ -43,7 +43,7 @@ public interface BleManagerCallbacks {
public void onDeviceDisconnected();
/**
* Some profiles may use this method to notify user that the link was lost. You must call this method in youe Ble Manager instead of {@link #onDeviceDisconnected()} while you discover
* Some profiles may use this method to notify user that the link was lost. You must call this method in your Ble Manager instead of {@link #onDeviceDisconnected()} while you discover
* disconnection not initiated by the user.
*/
public void onLinklossOccur();

View File

@@ -487,7 +487,7 @@ public abstract class BleProfileServiceReadyActivity<E extends BleProfileService
}
/**
* Some profiles may use this method to notify user that the link was lost. You must call this method in youe Ble Manager instead of
* Some profiles may use this method to notify user that the link was lost. You must call this method in your Ble Manager instead of
* {@link #onDeviceDisconnected()} while you discover disconnection not initiated by the user.
*/
public void onLinklossOccur() {

View File

@@ -225,7 +225,7 @@ public class ProximityService extends BleProfileService implements ProximityMana
secondAction = PendingIntent.getBroadcast(this, FIND_ME_REQ, intent, PendingIntent.FLAG_UPDATE_CURRENT);
}
// both activities above have launchMode="singleTask" in the AndoridManifest.xml file, so if the task is already running, it will be resumed
// both activities above have launchMode="singleTask" in the AndroidManifest.xml file, so if the task is already running, it will be resumed
final PendingIntent pendingIntent = PendingIntent.getActivities(this, OPEN_ACTIVITY_REQ, new Intent[] { parentIntent, targetIntent }, PendingIntent.FLAG_UPDATE_CURRENT);
final Notification.Builder builder = new Notification.Builder(this).setContentIntent(pendingIntent);
builder.setContentTitle(getString(R.string.app_name)).setContentText(getString(messageResId, getDeviceName()));

View File

@@ -116,7 +116,7 @@ public class RSCService extends BleProfileService implements RSCManagerCallbacks
@Override
protected void onUnbind() {
// when the activity closes we need to show the notification that user is connected to the sensor
createNotifcation(R.string.rsc_notification_connected_message, 0);
createNotification(R.string.rsc_notification_connected_message, 0);
}
@Override
@@ -176,7 +176,7 @@ public class RSCService extends BleProfileService implements RSCManagerCallbacks
* @param defaults
* signals that will be used to notify the user
*/
private void createNotifcation(final int messageResId, final int defaults) {
private void createNotification(final int messageResId, final int defaults) {
final Intent parentIntent = new Intent(this, FeaturesActivity.class);
parentIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
final Intent targetIntent = new Intent(this, RSCActivity.class);
@@ -184,7 +184,7 @@ public class RSCService extends BleProfileService implements RSCManagerCallbacks
final Intent disconnect = new Intent(ACTION_DISCONNECT);
final PendingIntent disconnectAction = PendingIntent.getBroadcast(this, DISCONNECT_REQ, disconnect, PendingIntent.FLAG_UPDATE_CURRENT);
// both activities above have launchMode="singleTask" in the AndoridManifest.xml file, so if the task is already running, it will be resumed
// both activities above have launchMode="singleTask" in the AndroidManifest.xml file, so if the task is already running, it will be resumed
final PendingIntent pendingIntent = PendingIntent.getActivities(this, OPEN_ACTIVITY_REQ, new Intent[] { parentIntent, targetIntent }, PendingIntent.FLAG_UPDATE_CURRENT);
final Notification.Builder builder = new Notification.Builder(this).setContentIntent(pendingIntent);
builder.setContentTitle(getString(R.string.app_name)).setContentText(getString(messageResId, getDeviceName()));

View File

@@ -47,7 +47,7 @@ public class ScannerServiceParser {
private static final byte LE_GENERAL_DISCOVERABLE_MODE = 0x02;
/**
* Checks if device is connectable (as Android cannot get this information directly we just check if it has GENERAL DISCOVERABLE or LIMITED DISCOVERABLE flag set) and has required service UUID in
* Checks if device is connectible (as Android cannot get this information directly we just check if it has GENERAL DISCOVERABLE or LIMITED DISCOVERABLE flag set) and has required service UUID in
* the advertising packet. The service UUID may be <code>null</code>.
* <p>
* For further details on parsing BLE advertisement packet data see https://developer.bluetooth.org/Pages/default.aspx Bluetooth Core Specifications Volume 3, Part C, and Section 8

View File

@@ -123,7 +123,7 @@ public class UARTEditDialog extends DialogFragment implements View.OnClickListen
editor.putString(UARTButtonAdapter.PREFS_BUTTON_COMMAND + index, command);
editor.putBoolean(UARTButtonAdapter.PREFS_BUTTON_ENABLED + index, active);
editor.putInt(UARTButtonAdapter.PREFS_BUTTON_ICON + index, mActiveIcon);
editor.commit();
editor.apply();
dismiss();
final UARTControlFragment parent = (UARTControlFragment) getParentFragment();

View File

@@ -146,7 +146,7 @@ public class UARTService extends BleProfileService implements UARTManagerCallbac
final Intent disconnect = new Intent(ACTION_DISCONNECT);
final PendingIntent disconnectAction = PendingIntent.getBroadcast(this, DISCONNECT_REQ, disconnect, PendingIntent.FLAG_UPDATE_CURRENT);
// both activities above have launchMode="singleTask" in the AndoridManifest.xml file, so if the task is already running, it will be resumed
// both activities above have launchMode="singleTask" in the AndroidManifest.xml file, so if the task is already running, it will be resumed
final PendingIntent pendingIntent = PendingIntent.getActivities(this, OPEN_ACTIVITY_REQ, new Intent[] { parentIntent, targetIntent }, PendingIntent.FLAG_UPDATE_CURRENT);
final Notification.Builder builder = new Notification.Builder(this).setContentIntent(pendingIntent);
builder.setContentTitle(getString(R.string.app_name)).setContentText(getString(messageResId, getDeviceName()));