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

Commit cf1f0210 authored by Matt Garnes's avatar Matt Garnes
Browse files

Merge CAF branch 'LA.BR.1.2.1_rb2.18' into caf/cm-12.0.

parents 6e358852 fe8ee00f
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -331,6 +331,18 @@ status_t BootAnimation::readyToRun() {
    status_t status = SurfaceComposerClient::getDisplayInfo(dtoken, &dinfo);
    if (status)
        return -1;
    char value[PROPERTY_VALUE_MAX];
    property_get("persist.panel.orientation", value, "0");
    int orient = atoi(value) / 90;

    if(orient == eOrientation90 || orient == eOrientation270) {
        int temp = dinfo.h;
        dinfo.h = dinfo.w;
        dinfo.w = temp;
    }

    Rect destRect(dinfo.w, dinfo.h);
    mSession->setDisplayProjection(dtoken, orient, destRect, destRect);

    // create the native surface
    sp<SurfaceControl> control = session()->createSurface(String8("BootAnimation"),
+6 −0
Original line number Diff line number Diff line
@@ -40,6 +40,12 @@ class SurfaceControl;
class BootAnimation : public Thread, public IBinder::DeathRecipient
{
public:
    enum {
        eOrientationDefault     = 0,
        eOrientation90          = 1,
        eOrientation180         = 2,
        eOrientation270         = 3,
    };
                BootAnimation();
    virtual     ~BootAnimation();

+2 −1
Original line number Diff line number Diff line
@@ -46,8 +46,9 @@ int main(int argc, char** argv)
    property_get("debug.sf.nobootanimation", value, "0");
    int noBootAnimation = atoi(value);
    ALOGI_IF(noBootAnimation,  "boot animation disabled");
    if (!noBootAnimation) {

    property_get("ro.alarm_boot", value, "false");
    if (!noBootAnimation && strcmp(value, "true")) {
        sp<ProcessState> proc(ProcessState::self());
        ProcessState::self()->startThreadPool();

+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(
+2 −0
Original line number Diff line number Diff line
@@ -146,6 +146,8 @@ public class LocalePicker extends ListFragment {
                        Log.v(TAG, "  and adding "+ toTitleCase(
                                getDisplayName(l, specialLocaleCodes, specialLocaleNames)));
                    }
                    localeInfos.add(new LocaleInfo(toTitleCase(
                            getDisplayName(l, specialLocaleCodes, specialLocaleNames)), l));
                } else {
                    String displayName = toTitleCase(l.getDisplayLanguage(l));
                    if (DEBUG) {
Loading