Loading res/values/strings.xml +4 −1 Original line number Diff line number Diff line Loading @@ -8607,8 +8607,11 @@ <string name="storage_percent_full">full</string> <!-- Label for button allow user to clear the data for an instant app --> <!-- Label for button allow user to remove the instant app from the device. --> <string name="clear_instant_app_data">Clear app</string> <!-- Confirmation message displayed when the user taps Clear app, to ensure they want to remove the instant app from the device. --> <string name="clear_instant_app_confirmation">Do you want to remove this instant app?</string> <!-- Title of games app storage screen [CHAR LIMIT=30] --> <string name="game_storage_settings">Games</string> src/com/android/settings/applications/ApplicationFeatureProvider.java +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ public interface ApplicationFeatureProvider { * only relevant to instant apps. */ InstantAppButtonsController newInstantAppButtonsController(Fragment fragment, View view); View view, InstantAppButtonsController.ShowDialogDelegate showDialogDelegate); /** * Calculates the total number of apps installed on the device via policy in the current user Loading src/com/android/settings/applications/ApplicationFeatureProviderImpl.java +2 −2 Original line number Diff line number Diff line Loading @@ -58,8 +58,8 @@ public class ApplicationFeatureProviderImpl implements ApplicationFeatureProvide @Override public InstantAppButtonsController newInstantAppButtonsController(Fragment fragment, View view) { return new InstantAppButtonsController(mContext, fragment, view); View view, InstantAppButtonsController.ShowDialogDelegate showDialogDelegate) { return new InstantAppButtonsController(mContext, fragment, view, showDialogDelegate); } @Override Loading src/com/android/settings/applications/InstalledAppDetails.java +9 −2 Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ import com.android.settings.applications.defaultapps.DefaultEmergencyPreferenceC import com.android.settings.applications.defaultapps.DefaultHomePreferenceController; import com.android.settings.applications.defaultapps.DefaultPhonePreferenceController; import com.android.settings.applications.defaultapps.DefaultSmsPreferenceController; import com.android.settings.applications.instantapps.InstantAppButtonsController; import com.android.settings.datausage.AppDataUsage; import com.android.settings.datausage.DataUsageList; import com.android.settings.datausage.DataUsageSummary; Loading Loading @@ -190,6 +191,8 @@ public class InstalledAppDetails extends AppInfoBase protected ProcStatsData mStatsManager; protected ProcStatsPackageEntry mStats; private InstantAppButtonsController mInstantAppButtonsController; private AppStorageStats mLastResult; private boolean handleDisableable(Button button) { Loading Loading @@ -771,6 +774,9 @@ public class InstalledAppDetails extends AppInfoBase .setNegativeButton(R.string.dlg_cancel, null) .create(); } if (mInstantAppButtonsController != null) { return mInstantAppButtonsController.createDialog(id); } return null; } Loading Loading @@ -1120,10 +1126,11 @@ public class InstalledAppDetails extends AppInfoBase if (AppUtils.isInstant(mPackageInfo.applicationInfo)) { LayoutPreference buttons = (LayoutPreference) findPreference(KEY_INSTANT_APP_BUTTONS); final Activity activity = getActivity(); FeatureFactory.getFactory(activity) mInstantAppButtonsController = FeatureFactory.getFactory(activity) .getApplicationFeatureProvider(activity) .newInstantAppButtonsController(this, buttons.findViewById(R.id.instant_app_button_container)) buttons.findViewById(R.id.instant_app_button_container), id -> showDialogInner(id, 0)) .setPackageName(mPackageName) .show(); } Loading src/com/android/settings/applications/PackageManagerWrapper.java +7 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.content.ComponentName; import android.content.Intent; import android.content.IntentFilter; import android.content.pm.ApplicationInfo; import android.content.pm.IPackageDeleteObserver; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.os.UserHandle; Loading Loading @@ -98,4 +99,10 @@ public interface PackageManagerWrapper { */ void replacePreferredActivity(IntentFilter homeFilter, int matchCategoryEmpty, ComponentName[] componentNames, ComponentName component); /** * Calls {@code PackageManager.deletePackageAsUser} */ void deletePackageAsUser(String packageName, IPackageDeleteObserver observer, int flags, int userId); } Loading
res/values/strings.xml +4 −1 Original line number Diff line number Diff line Loading @@ -8607,8 +8607,11 @@ <string name="storage_percent_full">full</string> <!-- Label for button allow user to clear the data for an instant app --> <!-- Label for button allow user to remove the instant app from the device. --> <string name="clear_instant_app_data">Clear app</string> <!-- Confirmation message displayed when the user taps Clear app, to ensure they want to remove the instant app from the device. --> <string name="clear_instant_app_confirmation">Do you want to remove this instant app?</string> <!-- Title of games app storage screen [CHAR LIMIT=30] --> <string name="game_storage_settings">Games</string>
src/com/android/settings/applications/ApplicationFeatureProvider.java +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ public interface ApplicationFeatureProvider { * only relevant to instant apps. */ InstantAppButtonsController newInstantAppButtonsController(Fragment fragment, View view); View view, InstantAppButtonsController.ShowDialogDelegate showDialogDelegate); /** * Calculates the total number of apps installed on the device via policy in the current user Loading
src/com/android/settings/applications/ApplicationFeatureProviderImpl.java +2 −2 Original line number Diff line number Diff line Loading @@ -58,8 +58,8 @@ public class ApplicationFeatureProviderImpl implements ApplicationFeatureProvide @Override public InstantAppButtonsController newInstantAppButtonsController(Fragment fragment, View view) { return new InstantAppButtonsController(mContext, fragment, view); View view, InstantAppButtonsController.ShowDialogDelegate showDialogDelegate) { return new InstantAppButtonsController(mContext, fragment, view, showDialogDelegate); } @Override Loading
src/com/android/settings/applications/InstalledAppDetails.java +9 −2 Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ import com.android.settings.applications.defaultapps.DefaultEmergencyPreferenceC import com.android.settings.applications.defaultapps.DefaultHomePreferenceController; import com.android.settings.applications.defaultapps.DefaultPhonePreferenceController; import com.android.settings.applications.defaultapps.DefaultSmsPreferenceController; import com.android.settings.applications.instantapps.InstantAppButtonsController; import com.android.settings.datausage.AppDataUsage; import com.android.settings.datausage.DataUsageList; import com.android.settings.datausage.DataUsageSummary; Loading Loading @@ -190,6 +191,8 @@ public class InstalledAppDetails extends AppInfoBase protected ProcStatsData mStatsManager; protected ProcStatsPackageEntry mStats; private InstantAppButtonsController mInstantAppButtonsController; private AppStorageStats mLastResult; private boolean handleDisableable(Button button) { Loading Loading @@ -771,6 +774,9 @@ public class InstalledAppDetails extends AppInfoBase .setNegativeButton(R.string.dlg_cancel, null) .create(); } if (mInstantAppButtonsController != null) { return mInstantAppButtonsController.createDialog(id); } return null; } Loading Loading @@ -1120,10 +1126,11 @@ public class InstalledAppDetails extends AppInfoBase if (AppUtils.isInstant(mPackageInfo.applicationInfo)) { LayoutPreference buttons = (LayoutPreference) findPreference(KEY_INSTANT_APP_BUTTONS); final Activity activity = getActivity(); FeatureFactory.getFactory(activity) mInstantAppButtonsController = FeatureFactory.getFactory(activity) .getApplicationFeatureProvider(activity) .newInstantAppButtonsController(this, buttons.findViewById(R.id.instant_app_button_container)) buttons.findViewById(R.id.instant_app_button_container), id -> showDialogInner(id, 0)) .setPackageName(mPackageName) .show(); } Loading
src/com/android/settings/applications/PackageManagerWrapper.java +7 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.content.ComponentName; import android.content.Intent; import android.content.IntentFilter; import android.content.pm.ApplicationInfo; import android.content.pm.IPackageDeleteObserver; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.os.UserHandle; Loading Loading @@ -98,4 +99,10 @@ public interface PackageManagerWrapper { */ void replacePreferredActivity(IntentFilter homeFilter, int matchCategoryEmpty, ComponentName[] componentNames, ComponentName component); /** * Calls {@code PackageManager.deletePackageAsUser} */ void deletePackageAsUser(String packageName, IPackageDeleteObserver observer, int flags, int userId); }