mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-26 10:35: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) {
|
||||
String action = intent.getAction();
|
||||
if (GBDevice.ACTION_DEVICE_CHANGED.equals(action)) {
|
||||
device = intent.getParcelableExtra(GBDevice.EXTRA_DEVICE);
|
||||
if (device != null) {
|
||||
final GBDevice changedDevice = intent.getParcelableExtra(GBDevice.EXTRA_DEVICE);
|
||||
if (changedDevice != null && changedDevice.equals(device)) {
|
||||
refreshBusyState(device);
|
||||
if (!device.isInitialized()) {
|
||||
setInstallEnabled(false);
|
||||
|
@ -491,13 +491,13 @@ public class GBDevice implements Parcelable {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (!(obj instanceof GBDevice)) {
|
||||
return false;
|
||||
}
|
||||
if (((GBDevice) obj).getAddress().equals(this.mAddress)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return ((GBDevice) obj).getAddress().equals(this.mAddress);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user