am 29423918: Fix regression in OBB key handling
Merge commit '2942391801b79816c5eb77d7ac94c4a65f26af48' into gingerbread-plus-aosp * commit '2942391801b79816c5eb77d7ac94c4a65f26af48': Fix regression in OBB key handling
This commit is contained in:
@@ -1599,20 +1599,23 @@ class MountService extends IMountService.Stub
|
||||
addObbState(obbState);
|
||||
}
|
||||
|
||||
final MessageDigest md;
|
||||
try {
|
||||
md = MessageDigest.getInstance("MD5");
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
Slog.e(TAG, "Could not load MD5 algorithm", e);
|
||||
String hashedKey = null;
|
||||
if (key != null) {
|
||||
final MessageDigest md;
|
||||
try {
|
||||
token.onObbResult(filename, Environment.MEDIA_UNMOUNTED);
|
||||
} catch (RemoteException e1) {
|
||||
Slog.d(TAG, "Could not send unmount notification for: " + filename);
|
||||
md = MessageDigest.getInstance("MD5");
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
Slog.e(TAG, "Could not load MD5 algorithm", e);
|
||||
try {
|
||||
token.onObbResult(filename, Environment.MEDIA_UNMOUNTED);
|
||||
} catch (RemoteException e1) {
|
||||
Slog.d(TAG, "Could not send unmount notification for: " + filename);
|
||||
}
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
String hashedKey = HexDump.toHexString(md.digest(key.getBytes()));
|
||||
hashedKey = HexDump.toHexString(md.digest(key.getBytes()));
|
||||
}
|
||||
|
||||
ObbAction action = new MountObbAction(obbState, hashedKey);
|
||||
mObbActionHandler.sendMessage(mObbActionHandler.obtainMessage(OBB_RUN_ACTION, action));
|
||||
@@ -1956,10 +1959,6 @@ class MountService extends IMountService.Stub
|
||||
throw new IllegalArgumentException("Caller package does not match OBB file");
|
||||
}
|
||||
|
||||
if (mKey == null) {
|
||||
mKey = "none";
|
||||
}
|
||||
|
||||
boolean mounted = false;
|
||||
int rc;
|
||||
synchronized (mObbState) {
|
||||
|
||||
Reference in New Issue
Block a user