Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4faed91 authored by Adrian DC's avatar Adrian DC Committed by Bruno Martins
Browse files

Gestures: Allow power menu settings for advanced restart on Go



 * Currently, if a device is built with Go configurations
   it includes the 'go_handheld_core_hardware.xml' permissions,
   the power menu settings will be hidden because the controls
   and cards permissions are not declared by the framework

 * In the case of power menu settings, 'Advanced restart' is the
   only setting that this menu provides and it works as expected,
   therefore we can make the controller always available

 * As a side effect, even without this change, we can find the
   menu and the advanced restart toggle through the search bar

Change-Id: If4c622cee759c1844d4bcb0c1fe346f13d2567f1
Signed-off-by: default avatarAdrian DC <radian.dc@gmail.com>
parent f7178f56
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ public class PowerMenuPreferenceController extends BasePreferenceController {

    @Override
    public int getAvailabilityStatus() {
        return isCardsAvailable() || isControlsAvailable() ? AVAILABLE : CONDITIONALLY_UNAVAILABLE;
        return AVAILABLE;
    }

    private boolean isControlsAvailable() {