Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c305df94 authored by Anna Trostanetski's avatar Anna Trostanetski Committed by Gerrit Code Review
Browse files

Merge "Show only listUIChanges instead of all"

parents afbbde35 77e4f7b3
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -16,9 +16,8 @@

package com.android.settings.development.compat;

import static com.android.settings.development.AppPicker.EXTRA_DEBUGGABLE;
import static com.android.settings.development.DevelopmentOptionsActivityRequestCodes.REQUEST_COMPAT_CHANGE_APP;
import static com.android.internal.compat.OverrideAllowedState.ALLOWED;
import static com.android.settings.development.DevelopmentOptionsActivityRequestCodes.REQUEST_COMPAT_CHANGE_APP;

import android.app.Activity;
import android.app.settings.SettingsEnums;
@@ -27,9 +26,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Bundle;
import android.os.RemoteException;
import android.os.ServiceManager;
@@ -45,8 +42,6 @@ import com.android.internal.compat.AndroidBuildClassifier;
import com.android.internal.compat.CompatibilityChangeConfig;
import com.android.internal.compat.CompatibilityChangeInfo;
import com.android.internal.compat.IPlatformCompat;
import com.android.internal.compat.IOverrideValidator;
import com.android.internal.compat.OverrideAllowedState;
import com.android.settings.R;
import com.android.settings.dashboard.DashboardFragment;
import com.android.settings.development.AppPicker;
@@ -105,7 +100,7 @@ public class PlatformCompatDashboard extends DashboardFragment {
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        try {
            mChanges = getPlatformCompat().listAllChanges();
            mChanges = getPlatformCompat().listUIChanges();
        } catch (RemoteException e) {
            throw new RuntimeException("Could not list changes!", e);
        }
+1 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ public class PlatformCompatDashboardTest {
        mChanges[2] = new CompatibilityChangeInfo(3L, "Enabled_After_SDK_1_1", 1, false, false, "");
        mChanges[3] = new CompatibilityChangeInfo(4L, "Enabled_After_SDK_1_2", 1, false, false, "");
        mChanges[4] = new CompatibilityChangeInfo(5L, "Enabled_After_SDK_2", 2, false, false, "");
        when(mPlatformCompat.listAllChanges()).thenReturn(mChanges);
        when(mPlatformCompat.listUIChanges()).thenReturn(mChanges);
        when(mPlatformCompat.getOverrideValidator()).thenReturn(mOverrideValidator);
        // By default, allow any change
        when(mOverrideValidator.getOverrideAllowedState(anyLong(),anyString()))