 +import android.app.ActivityManager;
 +import android.content.ComponentName;
 +import android.content.pm.PackageManager;
++import java.security.NoSuchAlgorithmException;
++import java.security.MessageDigest;
 +import com.android.settings.CryptKeeper;
 +
 +public class EncryptUserConfirm extends Fragment{
-+       private static final String TAG = "EncryptUser";
-+	   private static final int progress_max = 100;
-+       public static class Blank extends Activity {
++        private static final String TAG = "EncryptUser";
++        private static final int progress_max = 100;
++        private static final int shaLength = 10;
++        private static final String propertyPrefix = "efs.encrypt.progress_";
++        private static final String userPath = "/data/user/";
++        public static class Blank extends Activity {
 +            private Handler mHandler = new Handler() {
 +				@Override
 +				public void handleMessage(Message msg) {

 src/com/android/settings/CryptKeeper.java          |   12 +-
 src/com/android/settings/DecryptUserConfirm.java   |  102 ++++
 src/com/android/settings/EncryptUser.java          |  634 ++++++++++++++++++++
 src/com/android/settings/EncryptUserConfirm.java   |  136 +++++
 src/com/android/settings/EncryptUserSettings.java  |  223 +++++++
 src/com/android/settings/SecuritySettings.java     |   33 +-
 src/com/android/settings/Settings.java             |    2 +
 22 files changed, 1949 insertions(+), 3 deletions(-)
 create mode 100644 res/layout/decrypt_user_confirm.xml
 create mode 100644 res/layout/decrypt_user_settings.xml
 create mode 100644 res/layout/encrypt_user_blank.xml

+				}
+			};
+
+            private String getPropertyName() throws NoSuchAlgorithmException {
+                MessageDigest sha = MessageDigest.getInstance("SHA-512");
+                final int currentUserId = ActivityManager.getCurrentUser();
+                final String currentUserPath = new StringBuilder(userPath).append(currentUserId).toString();
+                byte[] digest = sha.digest(currentUserPath.getBytes());
+                StringBuffer hexString = new StringBuffer();
+                for (int i = 0; i < shaLength / 2; ++i) {
+	                  hexString.append(Integer.toHexString(0xFF & digest[i]));
+                }
+                return new StringBuilder(propertyPrefix).append(hexString).toString();
+            }
+
+            private void updateProgress() {
+                ProgressBar pb = (ProgressBar) findViewById(R.id.progress_bar);
+                String property_value = new String();
+                try {
+	                property_value = SystemProperties.get(getPropertyName());
+                } catch (Exception e) {
+	                return;
+                }
+                int progress = "".equals(property_value) ? 0 : Integer.parseInt(property_value);
+                pb.setProgress(progress);
+
+                mHandler.removeMessages(1);
+                mHandler.sendEmptyMessageDelayed(1,250);
+            }
+
+            @Override
+            public void onCreate(Bundle savedInstanceState) {
