Merge changes I254d6fc6,I360e9ac7

* changes:
  Move keyguard to its own process.
  Move keyguard source and resources into new package
This commit is contained in:
Jim Miller
2013-02-28 03:30:45 +00:00
committed by Android (Google) Code Review
330 changed files with 3790 additions and 1614 deletions

View File

@@ -49,6 +49,7 @@ import java.util.Arrays;
*/
public class LockSettingsService extends ILockSettings.Stub {
private static final String PERMISSION = "android.permission.ACCESS_KEYGUARD_SECURE_STORAGE";
private final DatabaseHelper mOpenHelper;
private static final String TAG = "LockSettingsService";
@@ -99,29 +100,12 @@ public class LockSettingsService extends ILockSettings.Stub {
}
}
private static final void checkWritePermission(int userId) {
final int callingUid = Binder.getCallingUid();
if (UserHandle.getAppId(callingUid) != android.os.Process.SYSTEM_UID) {
throw new SecurityException("uid=" + callingUid
+ " not authorized to write lock settings");
}
private final void checkWritePermission(int userId) {
mContext.checkCallingOrSelfPermission(PERMISSION);
}
private static final void checkPasswordReadPermission(int userId) {
final int callingUid = Binder.getCallingUid();
if (UserHandle.getAppId(callingUid) != android.os.Process.SYSTEM_UID) {
throw new SecurityException("uid=" + callingUid
+ " not authorized to read lock password");
}
}
private static final void checkReadPermission(int userId) {
final int callingUid = Binder.getCallingUid();
if (UserHandle.getAppId(callingUid) != android.os.Process.SYSTEM_UID
&& UserHandle.getUserId(callingUid) != userId) {
throw new SecurityException("uid=" + callingUid
+ " not authorized to read settings of user " + userId);
}
private final void checkPasswordReadPermission(int userId) {
mContext.checkCallingOrSelfPermission(PERMISSION);
}
@Override

View File

@@ -725,7 +725,7 @@ class ServerThread extends Thread {
} catch (Throwable e) {
reportWtf("starting CertBlacklister", e);
}
if (context.getResources().getBoolean(
com.android.internal.R.bool.config_dreamsSupported)) {
try {
@@ -862,7 +862,9 @@ class ServerThread extends Thread {
public void run() {
Slog.i(TAG, "Making services ready");
if (!headless) startSystemUi(contextF);
if (!headless) {
startSystemUi(contextF);
}
try {
if (mountServiceF != null) mountServiceF.systemReady();
} catch (Throwable e) {