Show OwnerInfo on CryptKeeper screen
Depends on framework change from https://googleplex-android-review.git.corp.google.com/#/c/435138/ Bug 13526708 Change-Id: I16189b629b5515ec5175e05155ba4ec0c27d22fb
This commit is contained in:
@@ -37,4 +37,17 @@
|
|||||||
android:text="@string/enter_password"
|
android:text="@string/enter_password"
|
||||||
android:drawableLeft="@*android:drawable/ic_lock_idle_lock"
|
android:drawableLeft="@*android:drawable/ic_lock_idle_lock"
|
||||||
/>
|
/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/owner_info"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dip"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:ellipsize="marquee"
|
||||||
|
android:marqueeRepeatLimit ="marquee_forever"
|
||||||
|
android:scrollHorizontally="true"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
|
/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@@ -367,23 +367,39 @@ public class CryptKeeper extends Activity implements TextView.OnEditorActionList
|
|||||||
setContentView(R.layout.crypt_keeper_progress);
|
setContentView(R.layout.crypt_keeper_progress);
|
||||||
encryptionProgressInit();
|
encryptionProgressInit();
|
||||||
} else if (mValidationComplete || isDebugView(FORCE_VIEW_PASSWORD)) {
|
} else if (mValidationComplete || isDebugView(FORCE_VIEW_PASSWORD)) {
|
||||||
final IMountService service = getMountService();
|
new AsyncTask<Void, Void, Void>() {
|
||||||
int type = StorageManager.CRYPT_TYPE_PASSWORD;
|
int type = StorageManager.CRYPT_TYPE_PASSWORD;
|
||||||
try {
|
String owner_info;
|
||||||
type = service.getPasswordType();
|
|
||||||
} catch (Exception e) {
|
|
||||||
Log.e(TAG, "Error while getting type - showing default dialog" + e);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(type == StorageManager.CRYPT_TYPE_PIN) {
|
@Override
|
||||||
setContentView(R.layout.crypt_keeper_pin_entry);
|
public Void doInBackground(Void... v) {
|
||||||
} else if (type == StorageManager.CRYPT_TYPE_PATTERN) {
|
try {
|
||||||
setContentView(R.layout.crypt_keeper_pattern_entry);
|
final IMountService service = getMountService();
|
||||||
setBackFunctionality(false);
|
type = service.getPasswordType();
|
||||||
} else {
|
owner_info = service.getField("OwnerInfo");
|
||||||
setContentView(R.layout.crypt_keeper_password_entry);
|
} catch (Exception e) {
|
||||||
}
|
Log.e(TAG, "Error calling mount service " + e);
|
||||||
passwordEntryInit();
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPostExecute(java.lang.Void v) {
|
||||||
|
if(type == StorageManager.CRYPT_TYPE_PIN) {
|
||||||
|
setContentView(R.layout.crypt_keeper_pin_entry);
|
||||||
|
} else if (type == StorageManager.CRYPT_TYPE_PATTERN) {
|
||||||
|
setContentView(R.layout.crypt_keeper_pattern_entry);
|
||||||
|
setBackFunctionality(false);
|
||||||
|
} else {
|
||||||
|
setContentView(R.layout.crypt_keeper_password_entry);
|
||||||
|
}
|
||||||
|
|
||||||
|
final TextView status = (TextView) findViewById(R.id.owner_info);
|
||||||
|
status.setText(owner_info);
|
||||||
|
passwordEntryInit();
|
||||||
|
}
|
||||||
|
}.execute();
|
||||||
} else if (!mValidationRequested) {
|
} else if (!mValidationRequested) {
|
||||||
// We're supposed to be encrypted, but no validation has been done.
|
// We're supposed to be encrypted, but no validation has been done.
|
||||||
new ValidationTask().execute((Void[]) null);
|
new ValidationTask().execute((Void[]) null);
|
||||||
|
Reference in New Issue
Block a user