mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-27 02:55:50 +01:00
FwAppInstallerActivity: Ignore updates from unrelated devices
This commit is contained in:
parent
1f95258e0e
commit
0b6f36047e
@ -85,8 +85,8 @@ public class FwAppInstallerActivity extends AbstractGBActivity implements Instal
|
|||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
String action = intent.getAction();
|
String action = intent.getAction();
|
||||||
if (GBDevice.ACTION_DEVICE_CHANGED.equals(action)) {
|
if (GBDevice.ACTION_DEVICE_CHANGED.equals(action)) {
|
||||||
device = intent.getParcelableExtra(GBDevice.EXTRA_DEVICE);
|
final GBDevice changedDevice = intent.getParcelableExtra(GBDevice.EXTRA_DEVICE);
|
||||||
if (device != null) {
|
if (changedDevice != null && changedDevice.equals(device)) {
|
||||||
refreshBusyState(device);
|
refreshBusyState(device);
|
||||||
if (!device.isInitialized()) {
|
if (!device.isInitialized()) {
|
||||||
setInstallEnabled(false);
|
setInstallEnabled(false);
|
||||||
|
@ -491,13 +491,13 @@ public class GBDevice implements Parcelable {
|
|||||||
if (obj == this) {
|
if (obj == this) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (obj == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (!(obj instanceof GBDevice)) {
|
if (!(obj instanceof GBDevice)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (((GBDevice) obj).getAddress().equals(this.mAddress)) {
|
return ((GBDevice) obj).getAddress().equals(this.mAddress);
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user