diff options
author | Jason parks <jparks@google.com> | 2011-01-26 13:11:42 -0600 |
---|---|---|
committer | Jason parks <jparks@google.com> | 2011-01-27 11:26:58 -0600 |
commit | f8217304073b5cd13823a0602568394be93bf310 (patch) | |
tree | be47aea71aab0938a2459f865d5c41aafb8340de /src/com/android/settings/CryptKeeperSettings.java | |
parent | f955eda877a35241635714a8ba2dfe8fc8a8c5c0 (diff) | |
download | packages_apps_Settings-f8217304073b5cd13823a0602568394be93bf310.zip packages_apps_Settings-f8217304073b5cd13823a0602568394be93bf310.tar.gz packages_apps_Settings-f8217304073b5cd13823a0602568394be93bf310.tar.bz2 |
More work on the Crypt Keeper.
* Use the DPM to determine if we are encrypted.
* Fix misspelling (Comfirm -> Confirm).
* Animate to black when enabling encryption.
* Add holo droid background.
* Change the progress bar to indterminate.
* Display the percentage complete in the status line.
* Fixed bug 3388097. You will no longer have to unplug your device to start encryption. This line is intentionally long. I could make it shorter but I am proving a point: <magic>overflow: auto;</magic>.
* Actually hold onto the wakelock to prvent the device from sleeping.
* Implement onStop() as a orientation change can happen at boot. This will start the activity twice and there will be multiple handlers with messages.
Change-Id: Ia752d106c39e0d81431e856f8f500182e8ec1abd
Diffstat (limited to 'src/com/android/settings/CryptKeeperSettings.java')
-rw-r--r-- | src/com/android/settings/CryptKeeperSettings.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/android/settings/CryptKeeperSettings.java b/src/com/android/settings/CryptKeeperSettings.java index d26e5ff..e584a3d 100644 --- a/src/com/android/settings/CryptKeeperSettings.java +++ b/src/com/android/settings/CryptKeeperSettings.java @@ -58,10 +58,10 @@ public class CryptKeeperSettings extends Fragment { public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if (action.equals(Intent.ACTION_BATTERY_CHANGED)) { - int level = intent.getIntExtra("level", 0); - int status = intent.getIntExtra("status", BatteryManager.BATTERY_STATUS_UNKNOWN); + int level = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, 0); + int plugged = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, 0); - if (status == BatteryManager.BATTERY_STATUS_CHARGING && level >= 80) { + if (plugged == BatteryManager.BATTERY_PLUGGED_AC && level >= 80) { mInitiateButton.setEnabled(true); } else { mInitiateButton.setEnabled(false); @@ -171,7 +171,7 @@ public class CryptKeeperSettings extends Fragment { private void showFinalConfirmation(String password) { Preference preference = new Preference(getActivity()); - preference.setFragment(CryptKeeperComfirm.class.getName()); + preference.setFragment(CryptKeeperConfirm.class.getName()); preference.setTitle(R.string.crypt_keeper_confirm_title); preference.getExtras().putString("password", password); ((PreferenceActivity) getActivity()).onPreferenceStartFragment(null, preference); |