Changes to installed app details screen for instant apps

Bug: 35098444
Test: make RunSettingsRoboTests

This implements the following changes to the app details screen:

-Suppresses the "Uninstall" and "Force Stop" buttons
-Adds "Install app" and "Clear app" buttons
-Adds a mechanism for showing a link to the store's app details
 page that can be different from the default for installed apps.

Change-Id: Icea83f7d1fde62d4101cb0c8a6d03849f6c56bca
This commit is contained in:
Antony Sargent
2017-03-08 14:34:10 -08:00
parent d3505c76cd
commit 09955c3865
9 changed files with 392 additions and 31 deletions

View File

@@ -29,6 +29,7 @@ import android.os.UserManager;
import android.util.ArraySet;
import android.view.View;
import com.android.settings.applications.instantapps.InstantAppButtonsController;
import com.android.settings.enterprise.DevicePolicyManagerWrapper;
import java.util.List;
@@ -56,6 +57,12 @@ public class ApplicationFeatureProviderImpl implements ApplicationFeatureProvide
return new AppHeaderController(mContext, fragment, appHeader);
}
@Override
public InstantAppButtonsController newInstantAppButtonsController(Fragment fragment,
View view) {
return new InstantAppButtonsController(mContext, fragment, view);
}
@Override
public void calculateNumberOfPolicyInstalledApps(boolean async, NumberOfAppsCallback callback) {
final AllUserPolicyInstalledAppCounter counter =