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

Commit 309ba003 authored by Varun Shah's avatar Varun Shah
Browse files

Remove deprecated USM#registerAppUsageLimitObserver.

Removes deprecated API registerAppUsageLimitObserver in
UsageStatsManager.

Bug: 126917290
Test: n/a
Change-Id: I21fb0a1ab47a1222af4e0052cd2b5fb0eb2ee9a8
parent acd69928
Loading
Loading
Loading
Loading
+0 −17
Original line number Diff line number Diff line
@@ -738,23 +738,6 @@ public final class UsageStatsManager {
        }
    }

    /**
     * @deprecated use
     * {@link #registerAppUsageLimitObserver(int, String[], Duration, Duration, PendingIntent)}.
     *
     * @removed
     * @hide
     */
    @Deprecated
    @UnsupportedAppUsage
    // STOPSHIP b/126917290: remove this method once b/126926550 is fixed.
    public void registerAppUsageLimitObserver(int observerId, @NonNull String[] observedEntities,
            long timeLimit, @NonNull TimeUnit timeUnit, @Nullable PendingIntent callbackIntent) {
        final Duration timeLimitDuration = Duration.ofMillis(timeUnit.toMillis(timeLimit));
        registerAppUsageLimitObserver(observerId, observedEntities,
                timeLimitDuration, timeLimitDuration, callbackIntent);
    }

    /**
     * Register a usage limit observer that receives a callback on the provided intent when the
     * sum of usages of apps and tokens in the provided {@code observedEntities} array exceeds the