Joshua Brindle wrote:
Ken Black wrote:
<snip>
We'd like to enable/disable menu items, or other functionality based on
SEAndroid booleans. So that even if the tablet has FEATURE_WIFI, if the
SEBoolean "secure_wifi_allowed" is FALSE, the menu item will be hidden.
I believe the FEATURE_WIFI means: "Does this H/W support WIFI?" and the
Boolean means "Is this tablet allowed to use/configure wifi". The latter
being set by a higher authority.

The way this was accomplished thus far is by making the above if into
something like this:

if
(!getPackageManager().hasSystemFeature(PackageManager.FEATURE_WIFI) ||
!SELinux.getSecureAllowedValue(SELinux.SECURE_WIFI_ALLOWED) ) {
target.remove(header);
}


FWIW not even devices that support more extensive MDM controls actually
remove menu items when they are disabled via MDM, at least that is true
of Samsung SAFE devices. AOSP does not have much in the way of MDM so
I'm not sure where this kind of code would go to live.

That said, I agree that it is definitely desirable from a principle of
least surprise point of view. Hitting buttons in settings and getting
force closes is no good for anyone.


Though in many cases the row is disabled for something MDM has restricted. But, again, this is only in proprietary builds, not in AOSP.


--
This message was distributed to subscribers of the seandroid-list mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe seandroid-list" without quotes as the message.

Reply via email to