webOS-ports / luneos-testing

Public testing images for LuneOS
4 stars 1 forks source link

Airplane mode not working #3

Open Herrie82 opened 2 years ago

Herrie82 commented 2 years ago

Describe the bug Airplane mode doesn't turn off wifi, bt and radio yet.

To Reproduce Turn on airplane mode in the system menu and observe that wifi, bt and radio remain active.

Expected behavior Toggling airplane mode should power off/on wifi, radio and BT

Screenshots If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

Herrie82 commented 11 months ago

Seems to be handled in /usr/lib/libPmWsfWanBlade.so

Need to decompile the VBox binary to see what it does

Herrie82 commented 11 months ago

Seems there are basically 3 calls that need to happen according to webOS 2.x Doctor files:

https://paste.ubuntu.com/p/sHVxpzR3pp/

if (this.btRadio || this.btRadioTurningOn) {
    this.btRadio = false;
    Mojo.Log.info("SystemUI - BT is on. Turning it off");
    this.btservicedisablereq = BtService.radiooff(null, btRadioFailure);        
}
else {
    Mojo.Log.info("SystemUI - BT is off.");
    this.updateAirplaneModeProgress('bluetooth');       
}

Mojo.Log.info("SystemUI - Phone is on. Turning it off");    
this.telephonyservicepoweroffreq = TelephonyService.powerSet('off',true, phoneRadioFailure,phoneRadioFailure);

if (this.wifiRadio) {
    Mojo.Log.info("SystemUI - WiFi is on. Turning it off");
    this.wifiservicedisablereq = WiFiService.setState("disabled", null, wifiRadioFailure);
}
else {
    Mojo.Log.info("SystemUI - WiFi is off");
    this.updateAirplaneModeProgress('wifi');
}