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

Commit dbfbf86d authored by Arne Coucheron's avatar Arne Coucheron Committed by Dan Pasanen
Browse files

Various fixes and cleanups after 7.1.2 merge

* Nuked CAF's modifications for carrier boot animation.
  Something we'll never use, and it conflicts with some
  related changes Google did in 7.1.2.
* Correctly assign new MAX_PROFILE_ID in BluetoothProfile
* Add missing mHandler in BluetoothManagerService
* Add missing mReset in LightsService
* Remove unused code.
* The rest is just code cleanup and modifications to match upstream
  AOSP code. The goal is to minimize future merge conflicts.

Change-Id: I27a7443244812602c072976eb979eb67f2e638a8
parent d597cd5a
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -26,8 +26,7 @@ LOCAL_SHARED_LIBRARIES := \
    libGLESv1_CM \
    libgui \
    libOpenSLES \
    libtinyalsa \
    libregionalization
    libtinyalsa

LOCAL_MODULE:= bootanimation

+6 −38
Original line number Diff line number Diff line
@@ -58,9 +58,6 @@
#include <EGL/eglext.h>

#include "BootAnimation.h"

#include <private/regionalization/Environment.h>

#include "audioplay.h"

namespace android {
@@ -261,35 +258,6 @@ status_t BootAnimation::initTexture(FileMap* map, int* width, int* height)
    return NO_ERROR;
}


// Get bootup Animation File
// Parameter: ImageID: IMG_OEM IMG_SYS IMG_ENC
// Return Value : File path
const char *BootAnimation::getAnimationFileName(ImageID image)
{
    const char *fileName[3] = { OEM_BOOTANIMATION_FILE,
            SYSTEM_BOOTANIMATION_FILE,
            SYSTEM_ENCRYPTED_BOOTANIMATION_FILE };

    // Load animations of Carrier through regionalization environment
    if (Environment::isSupported()) {
        Environment* environment = new Environment();
        const char* animFile = environment->getMediaFile(
                Environment::ANIMATION_TYPE, Environment::BOOT_STATUS);
        ALOGE("Get Carrier Animation type: %d,status:%d", Environment::ANIMATION_TYPE,Environment::BOOT_STATUS);
        if (animFile != NULL && strcmp(animFile, "") != 0) {
           return animFile;
        }else{
           ALOGD("Get Carrier Animation file: %s failed", animFile);
        }
        delete environment;
    }else{
           ALOGE("Get Carrier Animation file,since it's not support carrier");
    }

    return fileName[image];
}

status_t BootAnimation::readyToRun() {
    mAssets.addDefaultAssets();

@@ -351,14 +319,14 @@ status_t BootAnimation::readyToRun() {

    bool encryptedAnimation = atoi(decrypt) != 0 || !strcmp("trigger_restart_min_framework", decrypt);

    if (encryptedAnimation && (access(getAnimationFileName(IMG_ENC), R_OK) == 0)) {
        mZipFileName = getAnimationFileName(IMG_ENC);
    if (encryptedAnimation && (access(SYSTEM_ENCRYPTED_BOOTANIMATION_FILE, R_OK) == 0)) {
        mZipFileName = SYSTEM_ENCRYPTED_BOOTANIMATION_FILE;
    }
    else if (access(getAnimationFileName(IMG_OEM), R_OK) == 0) {
        mZipFileName = getAnimationFileName(IMG_OEM);
    else if (access(OEM_BOOTANIMATION_FILE, R_OK) == 0) {
        mZipFileName = OEM_BOOTANIMATION_FILE;
    }
    else if (access(getAnimationFileName(IMG_SYS), R_OK) == 0) {
        mZipFileName = getAnimationFileName(IMG_SYS);
    else if (access(SYSTEM_BOOTANIMATION_FILE, R_OK) == 0) {
        mZipFileName = SYSTEM_BOOTANIMATION_FILE;
    }
    return NO_ERROR;
}
+0 −7
Original line number Diff line number Diff line
@@ -122,13 +122,6 @@ private:
        Font clockFont;
    };

    /**
     *IMG_OEM: bootanimation file from oem/media
     *IMG_SYS: bootanimation file from system/media
     *IMG_ENC: encrypted bootanimation file from system/media
     */
    enum ImageID { IMG_OEM = 0, IMG_SYS = 1, IMG_ENC = 2 };
    const char *getAnimationFileName(ImageID image);
    status_t initTexture(Texture* texture, AssetManager& asset, const char* name);
    status_t initTexture(FileMap* map, int* width, int* height);
    status_t initFont(Font* font, const char* fallback);
+5 −5
Original line number Diff line number Diff line
@@ -137,17 +137,17 @@ public interface BluetoothProfile {
    public static final int PBAP_CLIENT = 17;

    /**
     * Max profile ID. This value should be updated whenever a new profile is added to match
     * the largest value assigned to a profile.
     * DUN
     * @hide
     */
    public static final int MAX_PROFILE_ID = 17;
    public static final int DUN = 21;

    /**
     * DUN
     * Max profile ID. This value should be updated whenever a new profile is added to match
     * the largest value assigned to a profile.
     * @hide
     */
    public static final int DUN = 21;
    public static final int MAX_PROFILE_ID = 21;

    /**
     * Default priority for devices that we try to auto-connect to and
+1 −0
Original line number Diff line number Diff line
@@ -1173,6 +1173,7 @@ public class LockPatternView extends View {
                    CellState cellState = mCellStates[i][j];
                    float centerX = getCenterXForColumn(j);
                    float translationY = cellState.translationY;

                    if (mUseLockPatternDrawable) {
                        drawCellDrawable(canvas, i, j, cellState.radius, drawLookup[i][j]);
                    } else {
Loading