Merge "Revert "Schematize vold system properties""
am: 6ee45c6f14
Change-Id: I085d9f227b7632f01cd614d46db7a6da349349fc
This commit is contained in:
@@ -622,8 +622,6 @@ java_defaults {
|
||||
"core/java/com/android/server/DropboxLogTags.logtags",
|
||||
"core/java/org/chromium/arc/EventLogTags.logtags",
|
||||
|
||||
":platform-properties",
|
||||
|
||||
":framework-statslog-gen",
|
||||
],
|
||||
|
||||
|
||||
@@ -52,7 +52,6 @@ import android.os.ServiceManager;
|
||||
import android.os.ServiceManager.ServiceNotFoundException;
|
||||
import android.os.SystemProperties;
|
||||
import android.provider.Settings;
|
||||
import android.sysprop.VoldProperties;
|
||||
import android.system.ErrnoException;
|
||||
import android.system.Os;
|
||||
import android.system.OsConstants;
|
||||
@@ -1466,7 +1465,7 @@ public class StorageManager {
|
||||
* framework, so no service needs to check for changes during their lifespan
|
||||
*/
|
||||
public static boolean isBlockEncrypting() {
|
||||
final String state = VoldProperties.encrypt_progress().orElse("");
|
||||
final String state = SystemProperties.get("vold.encrypt_progress", "");
|
||||
return !"".equalsIgnoreCase(state);
|
||||
}
|
||||
|
||||
@@ -1482,7 +1481,7 @@ public class StorageManager {
|
||||
* framework, so no service needs to check for changes during their lifespan
|
||||
*/
|
||||
public static boolean inCryptKeeperBounce() {
|
||||
final String status = VoldProperties.decrypt().orElse("");
|
||||
final String status = SystemProperties.get("vold.decrypt");
|
||||
return "trigger_restart_min_framework".equals(status);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
package com.android.systemui.statusbar.policy;
|
||||
|
||||
import android.sysprop.VoldProperties;
|
||||
import android.os.SystemProperties;
|
||||
|
||||
/**
|
||||
* Helper for determining whether the phone is decrypted yet.
|
||||
@@ -26,7 +26,7 @@ public class EncryptionHelper {
|
||||
public static final boolean IS_DATA_ENCRYPTED = isDataEncrypted();
|
||||
|
||||
private static boolean isDataEncrypted() {
|
||||
String voldState = VoldProperties.decrypt().orElse("");
|
||||
String voldState = SystemProperties.get("vold.decrypt");
|
||||
return "1".equals(voldState) || "trigger_restart_min_framework".equals(voldState);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,6 @@ import android.os.storage.VolumeInfo;
|
||||
import android.os.storage.VolumeRecord;
|
||||
import android.provider.MediaStore;
|
||||
import android.provider.Settings;
|
||||
import android.sysprop.VoldProperties;
|
||||
import android.text.TextUtils;
|
||||
import android.text.format.DateUtils;
|
||||
import android.util.ArrayMap;
|
||||
@@ -974,7 +973,7 @@ class StorageManagerService extends IStorageManager.Stub
|
||||
|
||||
// On an encrypted device we can't see system properties yet, so pull
|
||||
// the system locale out of the mount service.
|
||||
if ("".equals(VoldProperties.encrypt_progress().orElse(""))) {
|
||||
if ("".equals(SystemProperties.get("vold.encrypt_progress"))) {
|
||||
copyLocaleFromMountService();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -364,7 +364,6 @@ import android.provider.Downloads;
|
||||
import android.provider.Settings;
|
||||
import android.service.voice.IVoiceInteractionSession;
|
||||
import android.service.voice.VoiceInteractionManagerInternal;
|
||||
import android.sysprop.VoldProperties;
|
||||
import android.telecom.TelecomManager;
|
||||
import android.text.TextUtils;
|
||||
import android.text.format.DateUtils;
|
||||
@@ -7959,8 +7958,8 @@ public class ActivityManagerService extends IActivityManager.Stub
|
||||
SystemProperties.set("sys.boot_completed", "1");
|
||||
|
||||
// And trigger dev.bootcomplete if we are not showing encryption progress
|
||||
if (!"trigger_restart_min_framework".equals(VoldProperties.decrypt().orElse(""))
|
||||
|| "".equals(VoldProperties.encrypt_progress().orElse(""))){
|
||||
if (!"trigger_restart_min_framework".equals(SystemProperties.get("vold.decrypt"))
|
||||
|| "".equals(SystemProperties.get("vold.encrypt_progress"))) {
|
||||
SystemProperties.set("dev.bootcomplete", "1");
|
||||
}
|
||||
mUserController.sendBootCompleted(
|
||||
|
||||
@@ -48,7 +48,6 @@ import android.os.SystemProperties;
|
||||
import android.os.Trace;
|
||||
import android.os.UserHandle;
|
||||
import android.os.storage.IStorageManager;
|
||||
import android.sysprop.VoldProperties;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.EventLog;
|
||||
import android.util.Slog;
|
||||
@@ -626,7 +625,7 @@ public final class SystemServer {
|
||||
traceEnd();
|
||||
|
||||
// Only run "core" apps if we're encrypting the device.
|
||||
String cryptState = VoldProperties.decrypt().orElse("");
|
||||
String cryptState = SystemProperties.get("vold.decrypt");
|
||||
if (ENCRYPTING_STATE.equals(cryptState)) {
|
||||
Slog.w(TAG, "Detected encryption in progress - only parsing core apps");
|
||||
mOnlyCore = true;
|
||||
|
||||
@@ -34,10 +34,10 @@ import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.Message;
|
||||
import android.os.SystemClock;
|
||||
import android.os.SystemProperties;
|
||||
import android.os.UserHandle;
|
||||
import android.os.UserManager;
|
||||
import android.service.usb.UsbDebuggingManagerProto;
|
||||
import android.sysprop.VoldProperties;
|
||||
import android.util.Base64;
|
||||
import android.util.Slog;
|
||||
|
||||
@@ -263,7 +263,7 @@ public class UsbDebuggingManager {
|
||||
|
||||
case MESSAGE_ADB_CONFIRM: {
|
||||
if ("trigger_restart_min_framework".equals(
|
||||
VoldProperties.decrypt().orElse(""))) {
|
||||
SystemProperties.get("vold.decrypt"))) {
|
||||
Slog.d(TAG, "Deferring adb confirmation until after vold decrypt");
|
||||
if (mThread != null) {
|
||||
mThread.sendResponse("NO");
|
||||
|
||||
@@ -69,7 +69,6 @@ import android.os.storage.StorageVolume;
|
||||
import android.provider.Settings;
|
||||
import android.service.usb.UsbDeviceManagerProto;
|
||||
import android.service.usb.UsbHandlerProto;
|
||||
import android.sysprop.VoldProperties;
|
||||
import android.util.Pair;
|
||||
import android.util.Slog;
|
||||
|
||||
@@ -286,7 +285,7 @@ public class UsbDeviceManager implements ActivityManagerInternal.ScreenObserver
|
||||
mControlFds.put(UsbManager.FUNCTION_PTP, ptpFd);
|
||||
|
||||
boolean secureAdbEnabled = SystemProperties.getBoolean("ro.adb.secure", false);
|
||||
boolean dataEncrypted = "1".equals(VoldProperties.decrypt().orElse(""));
|
||||
boolean dataEncrypted = "1".equals(SystemProperties.get("vold.decrypt"));
|
||||
if (secureAdbEnabled && !dataEncrypted) {
|
||||
mDebuggingManager = new UsbDebuggingManager(context);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user