Commits

Stephen Smalley committed 0a2c91e Merge

Merge branch 'dogfood-seandroid' into intent_mac

Comments (0)

Files changed (1)

src/com/android/seandroid_admin/MMACFragment.java

 package com.android.seandroid_admin;
 
 import android.app.admin.DevicePolicyManager;
-import android.content.pm.SELinuxMMAC;
 import android.os.Bundle;
+import android.os.SystemProperties;
 import android.preference.CheckBoxPreference;
 import android.preference.Preference;
 import android.preference.Preference.OnPreferenceChangeListener;
     private static final String KEY_TYPES_RELOAD = "key_types_reload";
     private static final String KEY_TYPES_RESTORE = "key_types_restore";
 
+    private static final String MMAC_ENFORCE_PROPERTY = "persist.mmac.enforce";
     private static final String MMAC_POLICY_FILE = "mac_permissions.xml";
     private static final String INTENT_POLICY_FILE = "intent_mac.xml";
     private static final String TYPES_POLICY_FILE = "mmac_types.xml";
         
         if (mAdmin.isMMACadmin) {
             mMMACenforceCheckbox.setEnabled(true);
-            boolean systemState = SELinuxMMAC.getEnforcingMode();
+            boolean systemState = SystemProperties.getBoolean(MMAC_ENFORCE_PROPERTY, false);
             mMMACenforceCheckbox.setChecked(systemState);
             if (systemState) {
                 mMMACenforceCheckbox.setSummary(mMMACenforceCheckboxSummaryChecked);