Loading src/com/android/settings/applications/AppStateClonedAppsBridge.java +2 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,8 @@ public class AppStateClonedAppsBridge extends AppStateBaseBridge{ protected void updateExtraInfo(AppEntry app, String pkg, int uid) { // Display package if allowlisted but not yet cloned. // Or if the app is present in clone profile alongwith being in allowlist. if (mAllowedApps.contains(pkg) && ((!mCloneProfileApps.contains(pkg) || (app.isCloned)))) { if (mAllowedApps.contains(pkg) && ((!mCloneProfileApps.contains(pkg) || (app.isClonedProfile())))) { app.extraInfo = Boolean.TRUE; } else { app.extraInfo = Boolean.FALSE; Loading src/com/android/settings/applications/manageapplications/ApplicationViewHolder.java +3 −3 Original line number Diff line number Diff line Loading @@ -231,7 +231,7 @@ public class ApplicationViewHolder extends RecyclerView.ViewHolder { void updateAppCloneWidget(Context context, View.OnClickListener onClickListener, AppEntry entry) { if (mAddIcon != null) { if (!entry.isCloned) { if (!entry.isClonedProfile()) { mAddIcon.setBackground(context.getDrawable(R.drawable.ic_add_24dp)); } else { mAddIcon.setBackground(context.getDrawable(R.drawable.ic_trash_can)); Loading @@ -254,7 +254,7 @@ public class ApplicationViewHolder extends RecyclerView.ViewHolder { String packageName = entry.info.packageName; if (mWidgetContainer != null) { if (!entry.isCloned) { if (!entry.isClonedProfile()) { metricsFeatureProvider.action(context, SettingsEnums.ACTION_CREATE_CLONE_APP); mAddIcon.setVisibility(View.INVISIBLE); Loading Loading @@ -285,7 +285,7 @@ public class ApplicationViewHolder extends RecyclerView.ViewHolder { } }.execute(); } else if (entry.isCloned) { } else if (entry.isClonedProfile()) { metricsFeatureProvider.action(context, SettingsEnums.ACTION_DELETE_CLONE_APP); cloneBackend.uninstallClonedApp(packageName, /*allUsers*/ false, Loading src/com/android/settings/applications/manageapplications/ManageApplications.java +7 −0 Original line number Diff line number Diff line Loading @@ -295,6 +295,7 @@ public class ManageApplications extends InstrumentedFragment private String mVolumeUuid; private int mStorageType; private boolean mIsWorkOnly; private boolean mIsPrivateProfileOnly; private int mWorkUserId; private boolean mIsPersonalOnly; private View mEmptyView; Loading Loading @@ -378,6 +379,8 @@ public class ManageApplications extends InstrumentedFragment == ProfileSelectFragment.ProfileType.PERSONAL; mIsWorkOnly = args != null && args.getInt(ProfileSelectFragment.EXTRA_PROFILE) == ProfileSelectFragment.ProfileType.WORK; mIsPrivateProfileOnly = args != null && args.getInt(ProfileSelectFragment.EXTRA_PROFILE) == ProfileSelectFragment.ProfileType.PRIVATE; mWorkUserId = args != null ? args.getInt(EXTRA_WORK_ID) : UserHandle.myUserId(); if (mIsWorkOnly && mWorkUserId == UserHandle.myUserId()) { mWorkUserId = Utils.getManagedProfileId(mUserManager, UserHandle.myUserId()); Loading Loading @@ -660,6 +663,10 @@ public class ManageApplications extends InstrumentedFragment if (mIsWorkOnly) { compositeFilter = new CompoundFilter(compositeFilter, ApplicationsState.FILTER_WORK); } if (mIsPrivateProfileOnly) { compositeFilter = new CompoundFilter(compositeFilter, ApplicationsState.FILTER_PRIVATE_PROFILE); } if (mIsPersonalOnly) { compositeFilter = new CompoundFilter(compositeFilter, ApplicationsState.FILTER_PERSONAL); Loading Loading
src/com/android/settings/applications/AppStateClonedAppsBridge.java +2 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,8 @@ public class AppStateClonedAppsBridge extends AppStateBaseBridge{ protected void updateExtraInfo(AppEntry app, String pkg, int uid) { // Display package if allowlisted but not yet cloned. // Or if the app is present in clone profile alongwith being in allowlist. if (mAllowedApps.contains(pkg) && ((!mCloneProfileApps.contains(pkg) || (app.isCloned)))) { if (mAllowedApps.contains(pkg) && ((!mCloneProfileApps.contains(pkg) || (app.isClonedProfile())))) { app.extraInfo = Boolean.TRUE; } else { app.extraInfo = Boolean.FALSE; Loading
src/com/android/settings/applications/manageapplications/ApplicationViewHolder.java +3 −3 Original line number Diff line number Diff line Loading @@ -231,7 +231,7 @@ public class ApplicationViewHolder extends RecyclerView.ViewHolder { void updateAppCloneWidget(Context context, View.OnClickListener onClickListener, AppEntry entry) { if (mAddIcon != null) { if (!entry.isCloned) { if (!entry.isClonedProfile()) { mAddIcon.setBackground(context.getDrawable(R.drawable.ic_add_24dp)); } else { mAddIcon.setBackground(context.getDrawable(R.drawable.ic_trash_can)); Loading @@ -254,7 +254,7 @@ public class ApplicationViewHolder extends RecyclerView.ViewHolder { String packageName = entry.info.packageName; if (mWidgetContainer != null) { if (!entry.isCloned) { if (!entry.isClonedProfile()) { metricsFeatureProvider.action(context, SettingsEnums.ACTION_CREATE_CLONE_APP); mAddIcon.setVisibility(View.INVISIBLE); Loading Loading @@ -285,7 +285,7 @@ public class ApplicationViewHolder extends RecyclerView.ViewHolder { } }.execute(); } else if (entry.isCloned) { } else if (entry.isClonedProfile()) { metricsFeatureProvider.action(context, SettingsEnums.ACTION_DELETE_CLONE_APP); cloneBackend.uninstallClonedApp(packageName, /*allUsers*/ false, Loading
src/com/android/settings/applications/manageapplications/ManageApplications.java +7 −0 Original line number Diff line number Diff line Loading @@ -295,6 +295,7 @@ public class ManageApplications extends InstrumentedFragment private String mVolumeUuid; private int mStorageType; private boolean mIsWorkOnly; private boolean mIsPrivateProfileOnly; private int mWorkUserId; private boolean mIsPersonalOnly; private View mEmptyView; Loading Loading @@ -378,6 +379,8 @@ public class ManageApplications extends InstrumentedFragment == ProfileSelectFragment.ProfileType.PERSONAL; mIsWorkOnly = args != null && args.getInt(ProfileSelectFragment.EXTRA_PROFILE) == ProfileSelectFragment.ProfileType.WORK; mIsPrivateProfileOnly = args != null && args.getInt(ProfileSelectFragment.EXTRA_PROFILE) == ProfileSelectFragment.ProfileType.PRIVATE; mWorkUserId = args != null ? args.getInt(EXTRA_WORK_ID) : UserHandle.myUserId(); if (mIsWorkOnly && mWorkUserId == UserHandle.myUserId()) { mWorkUserId = Utils.getManagedProfileId(mUserManager, UserHandle.myUserId()); Loading Loading @@ -660,6 +663,10 @@ public class ManageApplications extends InstrumentedFragment if (mIsWorkOnly) { compositeFilter = new CompoundFilter(compositeFilter, ApplicationsState.FILTER_WORK); } if (mIsPrivateProfileOnly) { compositeFilter = new CompoundFilter(compositeFilter, ApplicationsState.FILTER_PRIVATE_PROFILE); } if (mIsPersonalOnly) { compositeFilter = new CompoundFilter(compositeFilter, ApplicationsState.FILTER_PERSONAL); Loading