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
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user