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

Commit bb652c71 authored by changbetty's avatar changbetty
Browse files

[Mainline] Expose the premium SMS consent in SmsManager

Bug: 146808981
Test: make
Change-Id: I59dd7995f7182359eb90e613b6594b58cd26bf6f
parent 993f69b3
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -83,16 +83,20 @@ public class SmsUsageMonitor {
    }

    /** Premium SMS permission for a new package (ask user when first premium SMS sent). */
    public static final int PREMIUM_SMS_PERMISSION_UNKNOWN = 0;
    public static final int PREMIUM_SMS_PERMISSION_UNKNOWN =
            SmsManager.PREMIUM_SMS_CONSENT_UNKNOWN;

    /** Default premium SMS permission (ask user for each premium SMS sent). */
    public static final int PREMIUM_SMS_PERMISSION_ASK_USER = 1;
    public static final int PREMIUM_SMS_PERMISSION_ASK_USER =
            SmsManager.PREMIUM_SMS_CONSENT_ASK_USER;

    /** Premium SMS permission when the owner has denied the app from sending premium SMS. */
    public static final int PREMIUM_SMS_PERMISSION_NEVER_ALLOW = 2;
    public static final int PREMIUM_SMS_PERMISSION_NEVER_ALLOW =
            SmsManager.PREMIUM_SMS_CONSENT_NEVER_ALLOW;

    /** Premium SMS permission when the owner has allowed the app to send premium SMS. */
    public static final int PREMIUM_SMS_PERMISSION_ALWAYS_ALLOW = 3;
    public static final int PREMIUM_SMS_PERMISSION_ALWAYS_ALLOW =
            SmsManager.PREMIUM_SMS_CONSENT_ALWAYS_ALLOW;

    private final int mCheckPeriod;
    private final int mMaxAllowed;