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

Commit a85a9157 authored by Joe Onorato's avatar Joe Onorato
Browse files

add ComponentInfo.isEnabled()

Change-Id: I5ce59f62dc0ce3ce446bdbe397d1515e43031d76
parent 55ccb887
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -58398,6 +58398,17 @@
 visibility="public"
>
</method>
<method name="isEnabled"
 return="boolean"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<field name="applicationInfo"
 type="android.content.pm.ApplicationInfo"
 transient="false"
+7 −0
Original line number Diff line number Diff line
@@ -99,6 +99,13 @@ public class ComponentInfo extends PackageItemInfo {
        return name;
    }

    /**
     * Return whether this component and its enclosing application are enabled.
     */
    public boolean isEnabled() {
        return enabled && applicationInfo.enabled;
    }
    
    /**
     * Return the icon resource identifier to use for this component.  If
     * the component defines an icon, that is used; else, the application