Update List of apps on device string,

remove "XX apps" string.

Bug: 32692748
Test: m RunSettingsRoboTests
Change-Id: I64f833497b5362f95cfc56a1057d97d9539ff029
This commit is contained in:
Denis Kuznetsov
2017-03-22 15:41:38 +01:00
parent 6edba87daa
commit 0c88ff4ed9
14 changed files with 51 additions and 235 deletions

View File

@@ -25,6 +25,11 @@ import java.util.List;
public abstract class InstalledAppCounter extends AppCounter {
/**
* Count all installed packages, irrespective of install reason.
*/
public static final int IGNORE_INSTALL_REASON = -1;
private final int mInstallReason;
private final PackageManagerWrapper mPackageManager;
@@ -38,7 +43,7 @@ public abstract class InstalledAppCounter extends AppCounter {
@Override
protected boolean includeInCount(ApplicationInfo info) {
final int userId = UserHandle.getUserId(info.uid);
if (mInstallReason != ApplicationFeatureProvider.IGNORE_INSTALL_REASON
if (mInstallReason != IGNORE_INSTALL_REASON
&& mPackageManager.getInstallReason(info.packageName,
new UserHandle(userId)) != mInstallReason) {
return false;