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

Commit 513aa438 authored by Brint E. Kriebel's avatar Brint E. Kriebel
Browse files

Merge branch 'cm-11.0' into stable/cm-11.0

parents 9282ec77 b15ac2d7
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -228,6 +228,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
@@ -39,6 +39,12 @@ class SurfaceControl;
class BootAnimation : public Thread, public IBinder::DeathRecipient
{
public:
    enum {
        eOrientationDefault     = 0,
        eOrientation90          = 1,
        eOrientation180         = 2,
        eOrientation270         = 3,
    };
                BootAnimation();
    virtual     ~BootAnimation();

+1 −1
Original line number Diff line number Diff line
@@ -318,7 +318,7 @@ public class ChooseTypeAndAccountActivity extends Activity
            }
            // if canceling out of addAccount and the original state caused us to skip this,
            // finish this activity
            if (mAccounts.isEmpty()) {
            if (null == mAccounts || mAccounts.isEmpty()) {
                setResult(Activity.RESULT_CANCELED);
                finish();
            }
+0 −1
Original line number Diff line number Diff line
@@ -39,7 +39,6 @@ import android.content.pm.ServiceInfo;
import android.content.res.AssetManager;
import android.content.res.CompatibilityInfo;
import android.content.res.Configuration;
import android.content.res.CustomTheme;
import android.content.res.Resources;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDebug;
+25 −6
Original line number Diff line number Diff line
@@ -788,6 +788,28 @@ final class ApplicationPackageManager extends PackageManager {
            getApplicationInfo(appPackageName, 0));
    }

    /** @hide */
    @Override
    public Resources getResourcesForApplicationAsUser(String appPackageName, int userId)
            throws NameNotFoundException {
        if (userId < 0) {
            throw new IllegalArgumentException(
                    "Call does not support special user #" + userId);
        }
        if ("system".equals(appPackageName)) {
            return mContext.mMainThread.getSystemContext().getResources();
        }
        try {
            ApplicationInfo ai = mPM.getApplicationInfo(appPackageName, 0, userId);
            if (ai != null) {
                return getResourcesForApplication(ai);
            }
        } catch (RemoteException e) {
            throw new RuntimeException("Package manager has died", e);
        }
        throw new NameNotFoundException("Package " + appPackageName + " doesn't exist");
    }

    /** @hide */
    @Override public Resources getThemedResourcesForApplication(
            ApplicationInfo app, String themePkgName) throws NameNotFoundException {
@@ -813,19 +835,16 @@ final class ApplicationPackageManager extends PackageManager {

    /** @hide */
    @Override
    public Resources getResourcesForApplicationAsUser(String appPackageName, int userId)
            throws NameNotFoundException {
    public Resources getThemedResourcesForApplicationAsUser(String appPackageName,
            String themePackageName, int userId) throws NameNotFoundException {
        if (userId < 0) {
            throw new IllegalArgumentException(
                    "Call does not support special user #" + userId);
        }
        if ("system".equals(appPackageName)) {
            return mContext.mMainThread.getSystemContext().getResources();
        }
        try {
            ApplicationInfo ai = mPM.getApplicationInfo(appPackageName, 0, userId);
            if (ai != null) {
                return getResourcesForApplication(ai);
                return getThemedResourcesForApplication(ai, themePackageName);
            }
        } catch (RemoteException e) {
            throw new RuntimeException("Package manager has died", e);
Loading