Pebble: allow sending data to the pebble during installation on FW >= 3.0
It seems to be no problem to recieve notifications etc during app installation with non legacy firmwares :)
This commit is contained in:
parent
375aa491d4
commit
2b3592f354
|
@ -486,10 +486,11 @@ class PebbleIoThread extends GBDeviceIoThread {
|
||||||
if (bytes == null) {
|
if (bytes == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// block writes if app installation in in progress
|
// on FW < 3.0 block writes if app installation in in progress
|
||||||
if (mIsConnected && (!mIsInstalling || mInstallState == PebbleAppInstallState.WAIT_SLOT)) {
|
if (!mIsConnected || (mPebbleProtocol.mFwMajor < 3 && mIsInstalling && mInstallState != PebbleAppInstallState.WAIT_SLOT)) {
|
||||||
write_real(bytes);
|
return;
|
||||||
}
|
}
|
||||||
|
write_real(bytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: parts are supporsed to be generic code
|
// FIXME: parts are supporsed to be generic code
|
||||||
|
@ -603,10 +604,6 @@ class PebbleIoThread extends GBDeviceIoThread {
|
||||||
}
|
}
|
||||||
|
|
||||||
void installApp(Uri uri, int appId) {
|
void installApp(Uri uri, int appId) {
|
||||||
if (mIsInstalling) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (uri.equals(Uri.parse("fake://health"))) {
|
if (uri.equals(Uri.parse("fake://health"))) {
|
||||||
write(mPebbleProtocol.encodeActivateHealth(true));
|
write(mPebbleProtocol.encodeActivateHealth(true));
|
||||||
write(mPebbleProtocol.encodeSetSaneDistanceUnit(true));
|
write(mPebbleProtocol.encodeSetSaneDistanceUnit(true));
|
||||||
|
@ -617,6 +614,10 @@ class PebbleIoThread extends GBDeviceIoThread {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mIsInstalling) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
String platformName = PebbleUtils.getPlatformName(gbDevice.getModel());
|
String platformName = PebbleUtils.getPlatformName(gbDevice.getModel());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue