Commits

Robert Craig committed 3c522dc

Changes to reflect moving seinfo inside PMS.

Moving seinfo inside PMS removes the exposed interface to
toggle the SELinuxMMAC enforcing mode, or to query its
status.

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_MMAC_RELOAD = "key_mmac_reload";
     private static final String KEY_MMAC_RESTORE = "key_mmac_restore";
 
+    private static final String MMAC_ENFORCE_PROPERTY = "persist.mmac.enforce";
     private static final String MMAC_POLICY_FILE = "mac_permissions.xml";
 
     private CheckBoxPreference mMMACenforceCheckbox;
         
         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);