Commits

Joman Chu  committed 0e7b6a1

Update names of constants to match AOSP submission

  • Participants
  • Parent commits 57fb467

Comments (0)

Files changed (1)

File src/com/android/seandroid_admin/SELinuxEnforcingFragment.java

                     try {
                         byte[] policy = FileUtils.readFileToByteArray(mSELinuxPolicyFile);
                         if (!mAdmin.mDPM.setCustomPolicyFile(mAdmin.mDeviceAdmin,
-                                DevicePolicyManager.SELINUX_POLICY_FILE, policy)) {
+                                DevicePolicyManager.SEPOLICY_FILE_SEPOLICY, policy)) {
                             Toast.makeText(mActivity, "Unable to set policy", Toast.LENGTH_SHORT).show();
                         } else {
                             Toast.makeText(mActivity, "Success", Toast.LENGTH_SHORT).show();
                 public boolean onPreferenceClick(Preference preference) {
                     Log.v(TAG, "Delete custom SELinux policy requested");
                     if (!mAdmin.mDPM.setCustomPolicyFile(mAdmin.mDeviceAdmin,
-                            DevicePolicyManager.SELINUX_POLICY_FILE, null)) {
+                            DevicePolicyManager.SEPOLICY_FILE_SEPOLICY, null)) {
                         Toast.makeText(mActivity, "Unable to remove custom policy", Toast.LENGTH_SHORT).show();
                     } else {
                         Toast.makeText(mActivity, "Success", Toast.LENGTH_SHORT).show();
                     try {
                         byte[] policy = FileUtils.readFileToByteArray(mPropertyContextsPolicyFile);
                         if (!mAdmin.mDPM.setCustomPolicyFile(mAdmin.mDeviceAdmin,
-                                DevicePolicyManager.PROPERTY_CONTEXTS_FILE, policy)) {
+                                DevicePolicyManager.SEPOLICY_FILE_PROPCTXS, policy)) {
                             Toast.makeText(mActivity, "Unable to set policy", Toast.LENGTH_SHORT).show();
                         } else {
                             Toast.makeText(mActivity, "Success", Toast.LENGTH_SHORT).show();
                 public boolean onPreferenceClick(Preference preference) {
                     Log.v(TAG, "Delete custom Property Contexts policy requested");
                     if (!mAdmin.mDPM.setCustomPolicyFile(mAdmin.mDeviceAdmin,
-                            DevicePolicyManager.PROPERTY_CONTEXTS_FILE, null)) {
+                            DevicePolicyManager.SEPOLICY_FILE_PROPCTXS, null)) {
                         Toast.makeText(mActivity, "Unable to remove custom policy", Toast.LENGTH_SHORT).show();
                     } else {
                         Toast.makeText(mActivity, "Success", Toast.LENGTH_SHORT).show();
                     try {
                         byte[] policy = FileUtils.readFileToByteArray(mFileContextsPolicyFile);
                         if (!mAdmin.mDPM.setCustomPolicyFile(mAdmin.mDeviceAdmin,
-                                DevicePolicyManager.FILE_CONTEXTS_FILE, policy)) {
+                                DevicePolicyManager.SEPOLICY_FILE_FILECTXS, policy)) {
                             Toast.makeText(mActivity, "Unable to set policy", Toast.LENGTH_SHORT).show();
                         } else {
                             Toast.makeText(mActivity, "Success", Toast.LENGTH_SHORT).show();
                 public boolean onPreferenceClick(Preference preference) {
                     Log.v(TAG, "Delete custom File Contexts policy requested");
                     if (!mAdmin.mDPM.setCustomPolicyFile(mAdmin.mDeviceAdmin,
-                            DevicePolicyManager.FILE_CONTEXTS_FILE, null)) {
+                            DevicePolicyManager.SEPOLICY_FILE_FILECTXS, null)) {
                         Toast.makeText(mActivity, "Unable to remove custom policy", Toast.LENGTH_SHORT).show();
                     } else {
                         Toast.makeText(mActivity, "Success", Toast.LENGTH_SHORT).show();
                     try {
                         byte[] policy = FileUtils.readFileToByteArray(mSEAppContextsPolicyFile);
                         if (!mAdmin.mDPM.setCustomPolicyFile(mAdmin.mDeviceAdmin,
-                                DevicePolicyManager.SEAPP_CONTEXTS_FILE, policy)) {
+                                DevicePolicyManager.SEPOLICY_FILE_SEAPPCTXS, policy)) {
                             Toast.makeText(mActivity, "Unable to set policy", Toast.LENGTH_SHORT).show();
                         } else {
                             Toast.makeText(mActivity, "Success", Toast.LENGTH_SHORT).show();
                 public boolean onPreferenceClick(Preference preference) {
                     Log.v(TAG, "Delete custom SEApp Contexts policy requested");
                     if (!mAdmin.mDPM.setCustomPolicyFile(mAdmin.mDeviceAdmin,
-                            DevicePolicyManager.SEAPP_CONTEXTS_FILE, null)) {
+                            DevicePolicyManager.SEPOLICY_FILE_SEAPPCTXS, null)) {
                         Toast.makeText(mActivity, "Unable to remove custom policy", Toast.LENGTH_SHORT).show();
                     } else {
                         Toast.makeText(mActivity, "Success", Toast.LENGTH_SHORT).show();