1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-25 18:15:49 +01:00

app: Random typo and consistency fixes.

This commit is contained in:
Uwe Hermann 2016-12-01 20:18:36 +01:00
parent 6dd74d04ac
commit 0746aaa579
25 changed files with 38 additions and 38 deletions

View File

@ -174,7 +174,7 @@
<data android:pathPattern="/.*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\..*\\.pbl" />
</intent-filter>
<!-- to receive the firmwares from the donwload content provider -->
<!-- to receive the firmwares from the download content provider -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
@ -182,7 +182,7 @@
<data android:mimeType="application/octet-stream" />
</intent-filter>
<!-- to receive firmwares from the donwload content provider if recognized as zip-->
<!-- to receive firmwares from the download content provider if recognized as zip-->
<intent-filter>
<action android:name="android.intent.action.VIEW" />

View File

@ -54,7 +54,7 @@
</head>
<body>
<div id="step1" class="step">
<h2>Url of the configuration:</h2>
<h2>URL of the configuration:</h2>
<div id="config_url"></div>
<!--<button class="btn" name="show config" value="show config" onclick="Pebble.showConfiguration()" >Show config / URL</button>-->
<button class="btn" name="open config" value="open config" onclick="Pebble.actuallyOpenURL()">
@ -67,7 +67,7 @@
</button>
</div>
<div id="step1compat" class="step">
<p>In case of "network error" after saving settings in the watchhapp, copy the "network error"
<p>In case of "network error" after saving settings in the watchapp, copy the "network error"
URL and paste it here:</p>
<textarea id="pastereturn"></textarea><br/>
<button class="btn" name="parse" onclick="Pebble.parseReturnedPebbleJS()">Parse legacy app

View File

@ -129,10 +129,10 @@ public class DiscoveryActivity extends GBActivity implements AdapterView.OnItemC
};
// why use a method to to get callback?
// why use a method to get callback?
// because this callback need API >= 21
// we cant add @TARGETAPI("Lollipop") at class header
// so use a method woth SDK check to return this callback
// so use a method with SDK check to return this callback
private ScanCallback getScanCallback() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
newLeScanCallback = new ScanCallback() {
@ -439,10 +439,10 @@ public class DiscoveryActivity extends GBActivity implements AdapterView.OnItemC
// New BTLE Discovery use startScan (List<ScanFilter> filters,
// ScanSettings settings,
// ScanCallback callback)
// Its added on API21
// It's added on API21
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
private void startNEWBTLEDiscovery() {
// Only use new APi when user use Lollipop+ device
// Only use new API when user uses Lollipop+ device
LOG.info("Start New BTLE Discovery");
handler.removeMessages(0, stopRunnable);
handler.sendMessageDelayed(getPostMessage(stopRunnable), SCAN_DURATION);

View File

@ -298,7 +298,7 @@ public class ExternalPebbleJSActivity extends GBActivity {
@JavascriptInterface
public String getWatchToken() {
//specification says: A string that is is guaranteed to be identical for each Pebble device for the same app across different mobile devices. The token is unique to your app and cannot be used to track Pebble devices across applications. see https://developer.pebble.com/docs/js/Pebble/
//specification says: A string that is guaranteed to be identical for each Pebble device for the same app across different mobile devices. The token is unique to your app and cannot be used to track Pebble devices across applications. see https://developer.pebble.com/docs/js/Pebble/
return "gb" + appUuid.toString();
}

View File

@ -148,7 +148,7 @@ public interface DeviceCoordinator {
boolean supportsScreenshots();
/**
* Returns true if this device/coordinator supports settig alarms.
* Returns true if this device/coordinator supports setting alarms.
*
* @return
*/

View File

@ -265,7 +265,7 @@ public class MiBand2Service {
*/
public static final byte AUTH_RESPONSE = 0x10;
/**
* Receeived in response to any authentication requests (byte 2 in the byte[] value.
* Received in response to any authentication requests (byte 2 in the byte[] value.
* 0x01 means success.
*/
public static final byte AUTH_SUCCESS = 0x01;

View File

@ -50,7 +50,7 @@ public class VibrationProfile {
*
* @param id the ID, used as preference key.
* @param onOffSequence a sequence of alternating on and off durations, in milliseconds
* @param repeat how ofoften the sequence shall be repeated
* @param repeat how often the sequence shall be repeated
*/
public VibrationProfile(String id, int[] onOffSequence, short repeat) {
this.id = id;

View File

@ -181,8 +181,8 @@ public class PBWInstallHandler implements InstallHandler {
}
public boolean isValid() {
// always pretend it is valid, as we cant know yet about hw/fw version
// always pretend it is valid, as we can't know yet about hw/fw version
return true;
}
}
}

View File

@ -232,7 +232,7 @@ public class PBWReader {
byte[] tmp_buf = new byte[32];
ByteBuffer buf = ByteBuffer.wrap(buffer);
buf.order(ByteOrder.LITTLE_ENDIAN);
buf.getLong(); // header, TODO: verifiy
buf.getLong(); // header, TODO: verify
buf.getShort(); // struct version, TODO: verify
mSdkVersion = buf.getShort();
mAppVersion = buf.getShort();
@ -342,4 +342,4 @@ public class PBWReader {
public JSONObject getAppKeysJSON() {
return mAppKeys;
}
}
}

View File

@ -57,7 +57,7 @@ public class K9Receiver extends BroadcastReceiver {
notificationSpec.type = NotificationType.GENERIC_EMAIL;
/*
* there seems to be no way to specify the the uri in the where clause.
* there seems to be no way to specify the uri in the where clause.
* If we do so, we just get the newest message, not the one requested.
* So, we will just search our message and match the uri manually.
* It should be the first one returned by the query in most cases,

View File

@ -257,7 +257,7 @@ public class GBDevice implements Parcelable {
}
/**
* for simplicity the user wont see all internal states, just connecting -> connected
* for simplicity the user won't see all internal states, just connecting -> connected
* instead of connecting->connected->initializing->initialized
* Set simple to true to get this behavior.
*/

View File

@ -644,7 +644,7 @@ public class DeviceCommunicationService extends Service implements SharedPrefere
setDeviceSupport(null);
NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
nm.cancel(GB.NOTIFICATION_ID); // need to do this because the updated notification wont be cancelled when service stops
nm.cancel(GB.NOTIFICATION_ID); // need to do this because the updated notification won't be cancelled when service stops
}
@Override

View File

@ -59,7 +59,7 @@ public abstract class AbstractBTLEOperation<T extends AbstractBTLEDeviceSupport>
* Subclasses must implement this. When invoked, #prePerform() returned
* successfully.
* Note that subclasses HAVE TO call #operationFinished() when the entire
* opreation is done (successful or not).
* operation is done (successful or not).
*
* @throws IOException
*/
@ -67,7 +67,7 @@ public abstract class AbstractBTLEOperation<T extends AbstractBTLEDeviceSupport>
/**
* You MUST call this method when the operation has finished, either
* successfull or unsuccessfully.
* successfully or unsuccessfully.
*
* @throws IOException
*/

View File

@ -25,7 +25,7 @@ public abstract class BtLEAction {
}
/**
* Returns true if this actions expects an (async) result which must
* Returns true if this action expects an (async) result which must
* be waited for, before continuing with other actions.
* <p/>
* This is needed because the current Bluedroid stack can only deal

View File

@ -148,7 +148,7 @@ public final class BtLEQueue {
}
synchronized (mGattMonitor) {
if (mBluetoothGatt != null) {
// Tribal knowledge says you're better off not reusing existing BlueoothGatt connections,
// Tribal knowledge says you're better off not reusing existing BluetoothGatt connections,
// so create a new one.
LOG.info("connect() requested -- disconnecting previous connection: " + mGbDevice.getName());
disconnect();

View File

@ -30,7 +30,7 @@ public class WriteAction extends BtLEAction {
public boolean run(BluetoothGatt gatt) {
BluetoothGattCharacteristic characteristic = getCharacteristic();
int properties = characteristic.getProperties();
//TODO: expectsResult should return false if PROPERTY_WRITE_NO_RESPONSE is true, but this yelds to timing issues
//TODO: expectsResult should return false if PROPERTY_WRITE_NO_RESPONSE is true, but this leads to timing issues
if ((properties & BluetoothGattCharacteristic.PROPERTY_WRITE) > 0 || ((properties & BluetoothGattCharacteristic.PROPERTY_WRITE_NO_RESPONSE) > 0)) {
return writeValue(gatt, characteristic, value);
}

View File

@ -29,7 +29,7 @@ public enum AlertCategory {
/**
* Returns the numerical ID value of this category
* To be used as uin8 value
* To be used as uint8 value
* @return the uint8 value for this category
*/
public int getId() {

View File

@ -17,7 +17,7 @@ public class SupportedNewAlertCategory {
/**
* Returns the numerical ID value of this category
* To be used as uin8 value
* To be used as uint8 value
* @return the uint8 value for this category
*/
public int getId() {

View File

@ -7,7 +7,7 @@ package nodomain.freeyourgadget.gadgetbridge.service.btle.profiles.heartrate;
*/
public enum BodySensorLocation {
Other(0),
Checst(1),
Chest(1),
Wrist(2),
Finger(3),
Hand(4),

View File

@ -56,7 +56,7 @@ public class AppMessageHandlerPebStyle extends AppMessageHandler {
pairs.add(new Pair<>(KEY_SECOND_HAND, (Object) 0)); //1 enabled
pairs.add(new Pair<>(KEY_BLUETOOTH_ALERT, (Object) 0)); //1 silent, 2 weak, up to 5
pairs.add(new Pair<>(KEY_TEMPERATURE_FORMAT, (Object) 1)); //0 fahrenheit
pairs.add(new Pair<>(KEY_LOCATION_SERVICE, (Object) 2)); //0 uto, 1 manual
pairs.add(new Pair<>(KEY_LOCATION_SERVICE, (Object) 2)); //0 auto, 1 manual
pairs.add(new Pair<>(KEY_SIDEBAR_LOCATION, (Object) 1)); //0 right
pairs.add(new Pair<>(KEY_COLOR_SELECTION, (Object) 1)); //1 custom
pairs.add(new Pair<>(KEY_MAIN_COLOR, (Object) PebbleColor.Black));
@ -115,4 +115,4 @@ public class AppMessageHandlerPebStyle extends AppMessageHandler {
return new GBDeviceEvent[]{sendBytes};
*/
}
}
}

View File

@ -323,7 +323,7 @@ class PebbleIoThread extends GBDeviceIoThread {
writeInstallApp(mPebbleProtocol.encodeInstallFirmwareComplete());
finishInstall(false);
} else if (mPBWReader.isLanguage() || mPebbleProtocol.mFwMajor >= 3) {
finishInstall(false); // FIXME: dont know yet how to detect success
finishInstall(false); // FIXME: don't know yet how to detect success
} else {
writeInstallApp(mPebbleProtocol.encodeAppRefresh(mInstallSlot));
}
@ -753,4 +753,4 @@ class PebbleIoThread extends GBDeviceIoThread {
UPLOAD_COMPLETE,
APP_REFRESH,
}
}
}

View File

@ -808,7 +808,7 @@ public class PebbleProtocol extends GBDeviceProtocol {
buf.putShort(duration);
buf.put((byte) 0x02); // type (0x02 = pin)
buf.putShort((short) 0x0001); // flags 0x0001 = ?
buf.put((byte) 0x01); // layout was (0x02 = pin?), 0x01 needed for subtitle aber seems to do no harm if there isn't one
buf.put((byte) 0x01); // layout was (0x02 = pin?), 0x01 needed for subtitle but seems to do no harm if there isn't one
buf.putShort((short) attributes_length); // total length of all attributes and actions in bytes
buf.put(attributes_count);
@ -1373,7 +1373,7 @@ public class PebbleProtocol extends GBDeviceProtocol {
ByteBuffer buf = ByteBuffer.allocate(12 + replies_length);
buf.order(ByteOrder.LITTLE_ENDIAN);
buf.putInt(0x00000000); // unknown
buf.put((byte) 0x00); // atributes count?
buf.put((byte) 0x00); // attributes count?
buf.put((byte) 0x01); // actions count?
// action

View File

@ -113,10 +113,10 @@ class PebbleGATTServer extends BluetoothGattServerCallback {
if (command == 0x02) { // some request?
LOG.info("got command 0x02");
if (value.length > 1) {
sendDataToPebble(new byte[]{0x03, 0x19, 0x19}); // no we dont know what that means
sendDataToPebble(new byte[]{0x03, 0x19, 0x19}); // no we don't know what that means
mPebbleLESupport.createPipedInputReader(); // FIXME: maybe not here
} else {
sendDataToPebble(new byte[]{0x03}); // no we dont know what that means
sendDataToPebble(new byte[]{0x03}); // no we don't know what that means
}
} else if (command == 0) { // normal package
LOG.info("got PPoGATT package serial = " + serial + " sending ACK");

View File

@ -128,7 +128,7 @@ public class GB {
// file header
headerbuf.put((byte) 'B');
headerbuf.put((byte) 'M');
headerbuf.putInt(0); // size in bytes (unconpressed = 0)
headerbuf.putInt(0); // size in bytes (uncompressed = 0)
headerbuf.putInt(0); // reserved
headerbuf.putInt(FILE_HEADER_SIZE + INFO_HEADER_SIZE + screenshot.clut.length);
@ -139,7 +139,7 @@ public class GB {
headerbuf.putShort((short) 1); // planes
headerbuf.putShort((short) screenshot.bpp);
headerbuf.putInt(0); // compression
headerbuf.putInt(0); // length of pixeldata in byte (uncompressed=0)
headerbuf.putInt(0); // length of pixeldata in bytes (uncompressed=0)
headerbuf.putInt(0); // pixels per meter (x)
headerbuf.putInt(0); // pixels per meter (y)
headerbuf.putInt(screenshot.clut.length / 4); // number of colors in CLUT

View File

@ -164,7 +164,7 @@ public class FirmwareTest {
String path = System.getProperty("MiFirmwareDir");
Assert.assertNotNull("You must run this test with -DMiFirmwareDir=/path/to/directory/with/miband/firmwarefiles/", path);
File dir = new File(path);
Assert.assertTrue("System property MiFirmwareDir should point to a directory continaing the Mi Band firmware files", dir.isDirectory());
Assert.assertTrue("System property MiFirmwareDir should point to a directory containing the Mi Band firmware files", dir.isDirectory());
return dir;
}