Loading src/com/android/settings/applications/AppStoreUtil.java +1 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,7 @@ public class AppStoreUtil { } /** Convenience method that looks up the installerPackageName for you. */ @Nullable public static Intent getAppStoreLink(Context context, String packageName) { String installerPackageName = getInstallerPackageName(context, packageName); return getAppStoreLink(context, installerPackageName, packageName); Loading src/com/android/settings/applications/specialaccess/interactacrossprofiles/InteractAcrossProfilesDetails.java +18 −9 Original line number Diff line number Diff line Loading @@ -384,20 +384,21 @@ public class InteractAcrossProfilesDetails extends AppInfoBase } private void handleInstallBannerClick() { if (mInstallAppIntent == null) { logEvent( DevicePolicyEnums.CROSS_PROFILE_SETTINGS_PAGE_INSTALL_BANNER_NO_INTENT_CLICKED); return; } if (!mInstalledInWork) { if (mInstallAppIntent != null && !mInstalledInWork && isInstallableInProfile(mInstallAppIntent, mWorkProfile)) { logEvent(DevicePolicyEnums.CROSS_PROFILE_SETTINGS_PAGE_INSTALL_BANNER_CLICKED); mContext.startActivityAsUser(mInstallAppIntent, mWorkProfile); return; } if (!mInstalledInPersonal) { if (mInstallAppIntent != null && !mInstalledInPersonal && isInstallableInProfile(mInstallAppIntent, mPersonalProfile)) { logEvent(DevicePolicyEnums.CROSS_PROFILE_SETTINGS_PAGE_INSTALL_BANNER_CLICKED); mContext.startActivityAsUser(mInstallAppIntent, mPersonalProfile); return; } logEvent(DevicePolicyEnums.CROSS_PROFILE_SETTINGS_PAGE_INSTALL_BANNER_NO_INTENT_CLICKED); } /** Loading Loading @@ -447,7 +448,8 @@ public class InteractAcrossProfilesDetails extends AppInfoBase R.string.interact_across_profiles_install_personal_app_title, mAppLabel), mAppLabel)); if (mInstallAppIntent != null) { if (mInstallAppIntent != null && isInstallableInProfile(mInstallAppIntent, mPersonalProfile)) { mInstallBanner.setSummary( R.string.interact_across_profiles_install_app_summary); } Loading @@ -461,7 +463,8 @@ public class InteractAcrossProfilesDetails extends AppInfoBase R.string.interact_across_profiles_install_work_app_title, mAppLabel), mAppLabel)); if (mInstallAppIntent != null) { if (mInstallAppIntent != null && isInstallableInProfile(mInstallAppIntent, mWorkProfile)) { mInstallBanner.setSummary( R.string.interact_across_profiles_install_app_summary); } Loading @@ -488,6 +491,12 @@ public class InteractAcrossProfilesDetails extends AppInfoBase return info != null; } private boolean isInstallableInProfile(Intent intent, UserHandle profile) { return !mContext.getPackageManager() .queryIntentActivitiesAsUser(intent, /* flags= */ 0, profile) .isEmpty(); } private void refreshUiForConfigurableApps() { mInstallBanner.setVisible(false); mSwitchPref.setEnabled(true); Loading Loading
src/com/android/settings/applications/AppStoreUtil.java +1 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,7 @@ public class AppStoreUtil { } /** Convenience method that looks up the installerPackageName for you. */ @Nullable public static Intent getAppStoreLink(Context context, String packageName) { String installerPackageName = getInstallerPackageName(context, packageName); return getAppStoreLink(context, installerPackageName, packageName); Loading
src/com/android/settings/applications/specialaccess/interactacrossprofiles/InteractAcrossProfilesDetails.java +18 −9 Original line number Diff line number Diff line Loading @@ -384,20 +384,21 @@ public class InteractAcrossProfilesDetails extends AppInfoBase } private void handleInstallBannerClick() { if (mInstallAppIntent == null) { logEvent( DevicePolicyEnums.CROSS_PROFILE_SETTINGS_PAGE_INSTALL_BANNER_NO_INTENT_CLICKED); return; } if (!mInstalledInWork) { if (mInstallAppIntent != null && !mInstalledInWork && isInstallableInProfile(mInstallAppIntent, mWorkProfile)) { logEvent(DevicePolicyEnums.CROSS_PROFILE_SETTINGS_PAGE_INSTALL_BANNER_CLICKED); mContext.startActivityAsUser(mInstallAppIntent, mWorkProfile); return; } if (!mInstalledInPersonal) { if (mInstallAppIntent != null && !mInstalledInPersonal && isInstallableInProfile(mInstallAppIntent, mPersonalProfile)) { logEvent(DevicePolicyEnums.CROSS_PROFILE_SETTINGS_PAGE_INSTALL_BANNER_CLICKED); mContext.startActivityAsUser(mInstallAppIntent, mPersonalProfile); return; } logEvent(DevicePolicyEnums.CROSS_PROFILE_SETTINGS_PAGE_INSTALL_BANNER_NO_INTENT_CLICKED); } /** Loading Loading @@ -447,7 +448,8 @@ public class InteractAcrossProfilesDetails extends AppInfoBase R.string.interact_across_profiles_install_personal_app_title, mAppLabel), mAppLabel)); if (mInstallAppIntent != null) { if (mInstallAppIntent != null && isInstallableInProfile(mInstallAppIntent, mPersonalProfile)) { mInstallBanner.setSummary( R.string.interact_across_profiles_install_app_summary); } Loading @@ -461,7 +463,8 @@ public class InteractAcrossProfilesDetails extends AppInfoBase R.string.interact_across_profiles_install_work_app_title, mAppLabel), mAppLabel)); if (mInstallAppIntent != null) { if (mInstallAppIntent != null && isInstallableInProfile(mInstallAppIntent, mWorkProfile)) { mInstallBanner.setSummary( R.string.interact_across_profiles_install_app_summary); } Loading @@ -488,6 +491,12 @@ public class InteractAcrossProfilesDetails extends AppInfoBase return info != null; } private boolean isInstallableInProfile(Intent intent, UserHandle profile) { return !mContext.getPackageManager() .queryIntentActivitiesAsUser(intent, /* flags= */ 0, profile) .isEmpty(); } private void refreshUiForConfigurableApps() { mInstallBanner.setVisible(false); mSwitchPref.setEnabled(true); Loading