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

Commit f25d3c1e authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Merge fe8ee00f on remote branch"

parents 36fee621 751c65dc
Loading
Loading
Loading
Loading
+32 −8
Original line number Diff line number Diff line
@@ -124,16 +124,36 @@ public class Patterns {
            + "[0-9]{2}|[1-9][0-9]|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}"
            + "|[1-9][0-9]|[0-9]))");

    /**
     * Match the characters without containing chinese characters
     * @hide
     */
    private static final String GOOD_IRI_HOST_CHAR =
        "a-zA-Z0-9\u00A0-\u2FFF\u3040-\u4DFF\u9FA6-\uD7FF"
        + "\uF900-\uFDCF\uFDF0-\uFEFF";

    /**
     * RFC 1035 Section 2.3.4 limits the labels to a maximum 63 octets.
     */
    private static final String IRI
        = "[" + GOOD_IRI_CHAR + "]([" + GOOD_IRI_CHAR + "\\-]{0,61}[" + GOOD_IRI_CHAR + "]){0,1}";
    private static final String IRI =
        "[" + GOOD_IRI_HOST_CHAR + "]([" + GOOD_IRI_HOST_CHAR + "\\-]{0,61}["
        + GOOD_IRI_HOST_CHAR + "]){0,1}";

    private static final String GOOD_GTLD_CHAR =
        "a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF";
        "a-zA-Z\u00A0-\u2FFF\u3040-\u4DFF\u9FA6-\uD7FF"
        + "\uF900-\uFDCF\uFDF0-\uFEFF";
    private static final String GTLD = "[" + GOOD_GTLD_CHAR + "]{2,63}";
    private static final String HOST_NAME = "(" + IRI + "\\.)+" + GTLD;
    // Halfwidth and fullwidth forms
    private static final String HALF_FULL_WIDTH_CHAR = "\uFF00-\uFFEF";
    // Symbols and punctuation
    private static final String SYMBOLS_PUNCTUATION_CHAR = "\u3000-\u303F";
    // Chinese characters
    private static final String CHINESE_CHAR = "\u4E00-\u9FA5";
    // Forbidden characters, should remove from URL,
    private static final String FORBIDDEN_CHAR =
        "[" + SYMBOLS_PUNCTUATION_CHAR + CHINESE_CHAR
        + HALF_FULL_WIDTH_CHAR + "]";

    public static final Pattern DOMAIN_NAME
        = Pattern.compile("(" + HOST_NAME + "|" + IP_ADDRESS + ")");
@@ -149,11 +169,15 @@ public class Patterns {
        + "\\.\\+\\!\\*\\'\\(\\)\\,\\;\\?\\&\\=]|(?:\\%[a-fA-F0-9]{2})){1,25})?\\@)?)?"
        + "(?:" + DOMAIN_NAME + ")"
        + "(?:\\:\\d{1,5})?)" // plus option port number
        + "(\\/(?:(?:[" + GOOD_IRI_CHAR + "\\;\\/\\?\\:\\@\\&\\=\\#\\~"  // plus option query params
        + "\\-\\.\\+\\!\\*\\'\\(\\)\\,\\_])|(?:\\%[a-fA-F0-9]{2}))*)?"
        + "(?:\\b|$)"); // and finally, a word boundary or end of
                        // input.  This is to stop foo.sure from
                        // matching as foo.su
        + "(\\/(?:(?:[" + GOOD_IRI_HOST_CHAR
        + "\\;\\/\\?\\:\\@\\&\\=\\#\\~"  // plus option query params
        + "\\-\\.\\+\\!\\*\\'\\(\\)\\_])|(?:\\,[" + GOOD_IRI_HOST_CHAR
        + "])|(?:\\%[a-fA-F0-9]{2}))*)?"
        + "(?:(?=" + FORBIDDEN_CHAR
        + ")|\\b|$)");
        // and finally, a word boundary or end of input. This is to stop
        // foo.sure from matching as foo.su
        // also should remove forbidden characters from end of URL.

    public static final Pattern EMAIL_ADDRESS
        = Pattern.compile(
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@
    <string name="permlab_readPhoneBlacklist">读取手机黑名单</string>
    <string name="profileGroupEmail">电子邮件</string>
    <string name="global_action_choose_profile">情景模式</string>
    <string name="profileNameAutomobile"></string>
    <string name="profileNameAutomobile"></string>
    <string name="permdesc_readPhoneBlacklist">允许应用读取有关被阻止来电或信息的电话号码的信息。</string>
    <string name="permlab_changePhoneBlacklist">更改手机黑名单</string>
    <string name="profileGroupGmail">Gmail</string>
+1 −1
Original line number Diff line number Diff line
@@ -1295,7 +1295,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
            intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
            intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
            if (DBG) Log.d(TAG,"Bluetooth State Change Intent: " + prevState + " -> " + newState);
            mContext.sendBroadcastAsUser(intent, UserHandle.CURRENT,
            mContext.sendBroadcastAsUser(intent, UserHandle.ALL,
                    BLUETOOTH_PERM);
        }
    }
+1 −2
Original line number Diff line number Diff line
@@ -2242,10 +2242,9 @@ public class SyncManager {
                    final long shiftedLastPollTimeAbsolute =
                            (0 < lastPollTimeAbsolute - mSyncRandomOffsetMillis) ?
                                    (lastPollTimeAbsolute - mSyncRandomOffsetMillis) : 0;
                    long remainingMillis
                        = periodInMillis - (shiftedNowAbsolute % periodInMillis);
                    long timeSinceLastRunMillis
                        = (nowAbsolute - lastPollTimeAbsolute);
                    long remainingMillis = periodInMillis - timeSinceLastRunMillis;
                    // Schedule this periodic sync to run early if it's close enough to its next
                    // runtime, and far enough from its last run time.
                    // If we are early, there will still be time remaining in this period.