Data flow anomaly: how to do it correct?
It would be bad practice to silently swallow an exception.  However, I think the following code would be acceptable:

String userAgent = "volley/0";  // Default value
try {
    String packageName = getPackageName();
    PackageInfo info = getPackageManager().getPackageInfo(packageName, 0);
    userAgent = packageName + "/" + info.versionCode;
} catch (PackageManager.NameNotFoundException justUseDefaultUserAgent) {
}


For the second snippet, I would use a ternary conditional to emphasize the goal of assigning stack a value no matter what.

HttpStack stack = (Build.VERSION.SDK_INT &gt;= 9) ? new HurlStack() :
    new HttpClientStack(AndroidHttpClient.newInstance(userAgent));