use of de.robv.android.xposed.installer.repo.RepoDb.RowNotFoundException in project XposedInstaller by rovo89.
the class ModulesFragment method onCreateContextMenu.
@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
InstalledModule installedModule = getItemFromContextMenuInfo(menuInfo);
if (installedModule == null)
return;
menu.setHeaderTitle(installedModule.getAppName());
getActivity().getMenuInflater().inflate(R.menu.context_menu_modules, menu);
if (getSettingsIntent(installedModule.packageName) == null)
menu.removeItem(R.id.menu_launch);
try {
String support = RepoDb.getModuleSupport(installedModule.packageName);
if (NavUtil.parseURL(support) == null)
menu.removeItem(R.id.menu_support);
} catch (RowNotFoundException e) {
menu.removeItem(R.id.menu_download_updates);
menu.removeItem(R.id.menu_support);
}
String installer = mPm.getInstallerPackageName(installedModule.packageName);
if (PLAY_STORE_LABEL != null && PLAY_STORE_PACKAGE.equals(installer))
menu.findItem(R.id.menu_play_store).setTitle(PLAY_STORE_LABEL);
else
menu.removeItem(R.id.menu_play_store);
}
Aggregations