am 807fd044: Merge "Validate AID format and length." into klp-dev

* commit '807fd0443564850bc69f229a282cbba990e1b656':
  Validate AID format and length.
This commit is contained in:
Martijn Coenen
2013-09-18 10:59:20 -07:00
committed by Android Git Automerger

View File

@@ -255,6 +255,10 @@ public final class ApduServiceInfo implements Parcelable {
return mRequiresDeviceUnlock;
}
public String getDescription() {
return mDescription;
}
public CharSequence loadLabel(PackageManager pm) {
return mService.loadLabel(pm);
}
@@ -287,6 +291,11 @@ public final class ApduServiceInfo implements Parcelable {
Log.e(TAG, "AID " + aid + " is not correctly formatted.");
return false;
}
// Minimum AID length is 5 bytes, 10 hex chars
if (aidLength < 10) {
Log.e(TAG, "AID " + aid + " is shorter than 5 bytes.");
return false;
}
return true;
}