package org.mozilla.mozstumbler;

import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;

final class PackageUtils {
    private PackageUtils() {
    }

    static String getAppVersion(Context context) {
        PackageManager pm = context.getPackageManager();
        try {
            return pm.getPackageInfo("org.mozilla.mozstumbler", 0).versionName;
        } catch (NameNotFoundException e) {
            throw new IllegalArgumentException(e);
        }
    }

    static String getMetaDataString(Context context, String name) {
        PackageManager pm = context.getPackageManager();
        String packageName = context.getPackageName();

        ApplicationInfo ai;
        try {
            ai = pm.getApplicationInfo(packageName, PackageManager.GET_META_DATA);
        } catch (NameNotFoundException e) {
            throw new IllegalArgumentException(e);
        }

        return (String) ai.metaData.get(name);
    }
}

@@ -1055,17 +1055,8 @@
 turn
- (String)
  ai.
@@ -1067,16 +1067,22 @@
 Data.get
+String
 (name);%0A

Remove unnecessary cast from PackageUtils.getMetaDataString()