 +				}
 +			};
 +
-+			private void updateProgress() {
-+				ProgressBar pb = (ProgressBar) findViewById(R.id.progress_bar);
-+				final String property_value = SystemProperties.get("efs.encrypt.progress_99a9a15548");
-+				int progress = "".equals(property_value) ? 0 : Integer.parseInt(property_value);
-+				
-+				pb.setProgress(progress);
-+					
-+				mHandler.removeMessages(1);
-+				mHandler.sendEmptyMessageDelayed(1,250);
-+			}
++            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) {

From 63bc4b141ef42bc4ee5ce7eda6886c7b4265d4c9 Mon Sep 17 00:00:00 2001
From: Nicolae-Alexandru Ivan <alexandru.ivan@intel.com>
Date: Mon, 21 Jul 2014 15:12:31 +0300
Subject: [PATCH] Integrate EFS with settings

---

+
+        if (("encrypted".equals(primaryUserEncrypted))) {
+            Intent intent = new Intent(this, EncryptUser.class);
+			startActivity(intent);
+            finish();
+            return;
+        }
