improved Apk.toString() for easier debugging
This commit is contained in:
parent
470145e611
commit
65c4087b05
@ -270,7 +270,7 @@ public class Apk extends ValueObject implements Comparable<Apk>, Parcelable {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return packageName + " (version " + versionCode + ")";
|
||||
return toContentValues().toString();
|
||||
}
|
||||
|
||||
public ContentValues toContentValues() {
|
||||
|
@ -41,12 +41,12 @@ public class InstallerFactory {
|
||||
*/
|
||||
public static Installer create(Context context, Apk apk) {
|
||||
if (apk == null || TextUtils.isEmpty(apk.packageName)) {
|
||||
throw new IllegalArgumentException("packageName must not be empty!");
|
||||
throw new IllegalArgumentException("Apk.packageName must not be empty: " + apk);
|
||||
}
|
||||
|
||||
Installer installer;
|
||||
if (apk.packageName.equals(PrivilegedInstaller.PRIVILEGED_EXTENSION_PACKAGE_NAME)) {
|
||||
// special case for "F-Droid Privileged Extension"
|
||||
// special case for installing "Privileged Extension" with root
|
||||
installer = new ExtensionInstaller(context, apk);
|
||||
} else if (PrivilegedInstaller.isDefault(context)) {
|
||||
Utils.debugLog(TAG, "privileged extension correctly installed -> PrivilegedInstaller");
|
||||
|
Loading…
x
Reference in New Issue
Block a user