Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c48e1ab authored by Romain Guy's avatar Romain Guy Committed by Android Git Automerger
Browse files

am 9634e349: am 1faae167: am 691b806f: Merge "Fix possible security issue. Bug #2553187" into froyo

parents b14fe53a 9634e349
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -78,9 +78,11 @@ public class PackageItemInfo {

    public PackageItemInfo(PackageItemInfo orig) {
        name = orig.name;
        if (name != null) name = name.trim();
        packageName = orig.packageName;
        labelRes = orig.labelRes;
        nonLocalizedLabel = orig.nonLocalizedLabel;
        if (nonLocalizedLabel != null) nonLocalizedLabel = nonLocalizedLabel.toString().trim();
        icon = orig.icon;
        metaData = orig.metaData;
    }
@@ -103,7 +105,7 @@ public class PackageItemInfo {
        if (labelRes != 0) {
            CharSequence label = pm.getText(packageName, labelRes, null);
            if (label != null) {
                return label;
                return label.toString().trim();
            }
        }
        if (name != null) {
+7 −3
Original line number Diff line number Diff line
@@ -133,7 +133,7 @@ public class ResolveInfo implements Parcelable {
        if (resolvePackageName != null && labelRes != 0) {
            label = pm.getText(resolvePackageName, labelRes, null);
            if (label != null) {
                return label;
                return label.toString().trim();
            }
        }
        ComponentInfo ci = activityInfo != null ? activityInfo : serviceInfo;
@@ -141,10 +141,14 @@ public class ResolveInfo implements Parcelable {
        if (labelRes != 0) {
            label = pm.getText(ci.packageName, labelRes, ai);
            if (label != null) {
                return label;
                return label.toString().trim();
            }
        }
        return ci.loadLabel(pm);

        CharSequence data = ci.loadLabel(pm);
        // Make the data safe
        if (data != null) data = data.toString().trim();
        return data;
    }
    
    /**
+2 −0
Original line number Diff line number Diff line
@@ -42,12 +42,14 @@
            android:textAppearance="?android:attr/textAppearanceLargeInverse"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:maxLines="2"
            android:paddingLeft="10dip" />
        <!-- Extended activity info to distinguish between duplicate activity names -->
        <TextView android:id="@android:id/text2"
            android:textAppearance="?android:attr/textAppearanceMediumInverse"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:maxLines="2"
            android:paddingLeft="10dip" />
    </LinearLayout>
</LinearLayout>