Merge "Fix the 'Google play system update' button is not actionable."

This commit is contained in:
Stanley Wang
2020-02-07 05:48:30 +00:00
committed by Android (Google) Code Review
3 changed files with 17 additions and 1 deletions

View File

@@ -86,8 +86,11 @@ public class MainlineModuleVersionPreferenceController extends BasePreferenceCon
mPackageManager.resolveActivity(MODULE_UPDATE_INTENT, 0 /* flags */);
if (resolved != null) {
preference.setIntent(MODULE_UPDATE_INTENT);
preference.setSelectable(true);
} else {
Log.d(TAG, "The ResolveInfo of the update intent is null.");
preference.setIntent(null);
preference.setSelectable(false);
}
}