Loading services/core/java/com/android/server/utils/quota/Categorizer.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -25,6 +25,9 @@ import android.annotation.Nullable; * @see Uptc * @see Uptc */ */ public interface Categorizer { public interface Categorizer { /** A {@link Categorizer} that always returns {@link Category.SINGLE_CATEGORY}. */ Categorizer SINGLE_CATEGORIZER = (userId, packageName, tag) -> Category.SINGLE_CATEGORY; /** /** * Return the {@link Category} that this UPTC belongs to. * Return the {@link Category} that this UPTC belongs to. * * Loading services/core/java/com/android/server/utils/quota/Category.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -28,6 +28,12 @@ import android.util.quota.CategoryProto; * @see Uptc * @see Uptc */ */ public final class Category { public final class Category { /** * A {@link Category} that can be used if every app should be treated the same (given the same * category). */ public static final Category SINGLE_CATEGORY = new Category("SINGLE"); @NonNull @NonNull private final String mName; private final String mName; Loading Loading
services/core/java/com/android/server/utils/quota/Categorizer.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -25,6 +25,9 @@ import android.annotation.Nullable; * @see Uptc * @see Uptc */ */ public interface Categorizer { public interface Categorizer { /** A {@link Categorizer} that always returns {@link Category.SINGLE_CATEGORY}. */ Categorizer SINGLE_CATEGORIZER = (userId, packageName, tag) -> Category.SINGLE_CATEGORY; /** /** * Return the {@link Category} that this UPTC belongs to. * Return the {@link Category} that this UPTC belongs to. * * Loading
services/core/java/com/android/server/utils/quota/Category.java +6 −0 Original line number Original line Diff line number Diff line Loading @@ -28,6 +28,12 @@ import android.util.quota.CategoryProto; * @see Uptc * @see Uptc */ */ public final class Category { public final class Category { /** * A {@link Category} that can be used if every app should be treated the same (given the same * category). */ public static final Category SINGLE_CATEGORY = new Category("SINGLE"); @NonNull @NonNull private final String mName; private final String mName; Loading