Don't assume all apps have a preferred signer, as media apps don't
Fixes #1156.
This commit is contained in:
parent
620affa239
commit
ac1dce24d2
@ -1141,13 +1141,14 @@ public class App extends ValueObject implements Comparable<App>, Parcelable {
|
|||||||
* the user to try and install versions with that signature (because thats all the OS will let
|
* the user to try and install versions with that signature (because thats all the OS will let
|
||||||
* them do).
|
* them do).
|
||||||
*/
|
*/
|
||||||
@NonNull
|
@Nullable
|
||||||
public String getMostAppropriateSignature() {
|
public String getMostAppropriateSignature() {
|
||||||
if (!TextUtils.isEmpty(installedSig)) {
|
if (!TextUtils.isEmpty(installedSig)) {
|
||||||
return installedSig;
|
return installedSig;
|
||||||
} else if (!TextUtils.isEmpty(preferredSigner)) {
|
} else if (!TextUtils.isEmpty(preferredSigner)) {
|
||||||
return preferredSigner;
|
return preferredSigner;
|
||||||
}
|
}
|
||||||
throw new IllegalStateException("Most Appropriate Signature not found!");
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user