Skip to content

Instantly share code, notes, and snippets.

@ganadist
Created April 1, 2014 01:35
Show Gist options
  • Save ganadist/9906094 to your computer and use it in GitHub Desktop.
Save ganadist/9906094 to your computer and use it in GitHub Desktop.
frameworks/base: patch for disable dpm
diff --git a/services/java/com/android/server/DevicePolicyManagerService.java b/services/ja
index 2bb99d6..353084b 100644
--- a/services/java/com/android/server/DevicePolicyManagerService.java
+++ b/services/java/com/android/server/DevicePolicyManagerService.java
@@ -632,6 +632,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.St
alarmTime = now + alarmInterval;
}
+ if (true) return;
+
long token = Binder.clearCallingIdentity();
try {
AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVIC
@@ -1775,6 +1777,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.
return true;
}
enforceCrossUserPermission(userHandle);
+ if (true) return true;
synchronized (this) {
DevicePolicyData policy = getUserData(userHandle);
// This API can only be called by an active device admin,
@@ -1860,6 +1863,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.
return false;
}
enforceCrossUserPermission(userHandle);
+ if (true) return false;
int quality;
synchronized (this) {
// This API can only be called by an active device admin,
@@ -2569,6 +2573,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.
// Ok to return current status.
}
enforceCrossUserPermission(userHandle);
+ if (true) return DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE;
return getEncryptionStatus();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment