VPN: Convert current-context IPCs to user context

These fetch info for the wrong user, which may be either wrong or worse
wholly nonexistent.

Bug: 20747154
Change-Id: Ibd5f2e5d3c5dfd252a032ebdfe204de7166fa3a5
This commit is contained in:
Robin Lee
2015-05-01 17:42:30 +01:00
parent f09497a2a7
commit ab6a65c03b
4 changed files with 47 additions and 42 deletions

View File

@@ -251,7 +251,7 @@ public class VpnSettings extends SettingsPreferenceFragment implements
// Already onnected or no launch intent available - show an info dialog
PackageInfo pkgInfo = pref.getPackageInfo();
AppDialogFragment.show(this, pkgInfo, false /* editing */, connected);
AppDialogFragment.show(this, pkgInfo, pref.getLabel(), false /* editing */, connected);
return true;
}
return false;
@@ -268,8 +268,9 @@ public class VpnSettings extends SettingsPreferenceFragment implements
true /* exists */);
} else if (tag instanceof AppPreference) {
AppPreference pref = (AppPreference) tag;
AppDialogFragment.show(VpnSettings.this, pref.getPackageInfo(), true /* editing */,
(pref.getState() == AppPreference.STATE_CONNECTED) /* connected */);
boolean connected = (pref.getState() == AppPreference.STATE_CONNECTED);
AppDialogFragment.show(VpnSettings.this, pref.getPackageInfo(), pref.getLabel(),
true /* editing */, connected);
}
}
};