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

Commit 4d5b0be4 authored by Yuliya Kamatkova's avatar Yuliya Kamatkova Committed by Android (Google) Code Review
Browse files

Merge "Restrict visibility of LOCUS_ID_SET events."

parents 74a2c393 fea62a51
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ package android {
    field public static final String ACCESS_DRM_CERTIFICATES = "android.permission.ACCESS_DRM_CERTIFICATES";
    field @Deprecated public static final String ACCESS_FM_RADIO = "android.permission.ACCESS_FM_RADIO";
    field public static final String ACCESS_INSTANT_APPS = "android.permission.ACCESS_INSTANT_APPS";
    field public static final String ACCESS_LOCUS_ID_USAGE_STATS = "android.permission.ACCESS_LOCUS_ID_USAGE_STATS";
    field public static final String ACCESS_MESSAGES_ON_ICC = "android.permission.ACCESS_MESSAGES_ON_ICC";
    field public static final String ACCESS_MOCK_LOCATION = "android.permission.ACCESS_MOCK_LOCATION";
    field public static final String ACCESS_MTP = "android.permission.ACCESS_MTP";
+4 −0
Original line number Diff line number Diff line
@@ -4943,6 +4943,10 @@
    <permission android:name="android.permission.ACCESS_TV_TUNER"
        android:protectionLevel="signature|privileged" />

    <!-- @hide @SystemApi Allows an application to access locusId events in the usage stats. -->
    <permission android:name="android.permission.ACCESS_LOCUS_ID_USAGE_STATS"
                android:protectionLevel="signature|appPredictor" />

    <application android:process="system"
                 android:persistent="true"
                 android:hasCode="false"
+3 −0
Original line number Diff line number Diff line
@@ -253,6 +253,9 @@
    <!-- Permission required for CTS test - ShortcutManagerUsageTest -->
    <uses-permission android:name="android.permission.ACCESS_SHORTCUTS"/>

     <!-- Permission required for CTS test - UsageStatsTest -->
    <uses-permission android:name="android.permission.ACCESS_LOCUS_ID_USAGE_STATS"/>

    <!-- Permissions required to test ambient display. -->
    <uses-permission android:name="android.permission.READ_DREAM_STATE"/>
    <uses-permission android:name="android.permission.WRITE_DREAM_STATE"/>
+5 −1
Original line number Diff line number Diff line
@@ -220,9 +220,13 @@ public abstract class UsageStatsManagerInternal {
     *     result.
     * @param hideShortcutInvocationEvents whether the {@link UsageEvents.Event#SHORTCUT_INVOCATION}
     *     events need to be excluded from the result.
     * @param hideLocusIdEvents whether the {@link UsageEvents.Event#LOCUS_ID_SET}
     *     events need to be excluded from the result.
     *
     */
    public abstract UsageEvents queryEventsForUser(@UserIdInt int userId, long beginTime,
            long endTime, boolean obfuscateInstantApps, boolean hideShortcutInvocationEvents);
            long endTime, boolean obfuscateInstantApps, boolean hideShortcutInvocationEvents,
            boolean hideLocusIdEvents);

    /**
     * Used to persist the last time a job was run for this app, in order to make decisions later
+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ class UsageStatsQueryHelper {
     */
    boolean querySince(long sinceTime) {
        UsageEvents usageEvents = mUsageStatsManagerInternal.queryEventsForUser(
                mUserId, sinceTime, System.currentTimeMillis(), false, false);
                mUserId, sinceTime, System.currentTimeMillis(), false, false, false);
        if (usageEvents == null) {
            return false;
        }
Loading