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

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

Merge remote-tracking branch 'github/cm-11.0' into HEAD

parents eab456dd 4d25afe5
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -684,6 +684,11 @@ public final class MediaStore {
                            return null;
                        }
                        filePath = c.getString(1);
                        // this DB query can return null under some synchronization issue,
                        // returning NULL bitmap in such cases.
                        if (filePath == null) {
                            return null;
                        }
                    }
                    if (isVideo) {
                        bitmap = ThumbnailUtils.createVideoThumbnail(filePath, kind);
+3 −3
Original line number Diff line number Diff line
@@ -13159,12 +13159,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
                info.mHardwareRenderer.safelyRun(new Runnable() {
                    @Override
                    public void run() {
                        // cancelLayerUpdate() is not called here because the
                        // glCanvas is null when HardwareRender is disabled
                        // cancelLayerUpdate is actually done in the glCanvas.
                        mHardwareLayer.destroy();
                        mHardwareLayer = null;
                        if (mDisplayList != null) {
                            mDisplayList.reset();
                        }
                        invalidate(true);
                        invalidateParentCaches();
                    }
+3 −0
Original line number Diff line number Diff line
@@ -207,4 +207,7 @@

    <!-- Default value of Settings.System.NOISE_SUPPRESSION -->
    <bool name="def_noise_suppression">false</bool>

    <!-- Default value of Settings.System.SCREEN_ANIMATION_STYLE -->
    <integer name="def_screen_animation_style">0</integer>
</resources>
+24 −1
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ public class DatabaseHelper extends SQLiteOpenHelper {
    // database gets upgraded properly. At a minimum, please confirm that 'upgradeVersion'
    // is properly propagated through your change.  Not doing so will result in a loss of user
    // settings.
    private static final int DATABASE_VERSION = 99;
    private static final int DATABASE_VERSION = 100;

    private Context mContext;
    private int mUserHandle;
@@ -1617,6 +1617,14 @@ public class DatabaseHelper extends SQLiteOpenHelper {
            upgradeVersion = 99;
        }


        if (upgradeVersion == 99) {
            if (mUserHandle == UserHandle.USER_OWNER) {
                loadScreenAnimationStyle(db);
            }
            upgradeVersion = 100;
        }

        // *** Remember to update DATABASE_VERSION above!

        if (upgradeVersion != currentVersion) {
@@ -2036,6 +2044,21 @@ public class DatabaseHelper extends SQLiteOpenHelper {
        }
    }

    private void loadScreenAnimationStyle(SQLiteDatabase db) {
        db.beginTransaction();
        SQLiteStatement stmt = null;
        try {
            stmt = db.compileStatement("INSERT OR REPLACE INTO system(name,value)"
                    + " VALUES(?,?);");
            loadIntegerSetting(stmt, Settings.System.SCREEN_ANIMATION_STYLE,
                    R.integer.def_screen_animation_style);
            db.setTransactionSuccessful();
        } finally {
            db.endTransaction();
            if (stmt != null) stmt.close();
        }
    }

    private void loadSettings(SQLiteDatabase db) {
        loadSystemSettings(db);
        loadSecureSettings(db);
+26 −3
Original line number Diff line number Diff line
@@ -370,6 +370,7 @@ public class NavigationBarView extends LinearLayout {
            ViewGroup container = (ViewGroup) mRotatedViews[i];
            if (container != null) {
                updateKeyButtonViewResources(container);
                updateLightsOutResources(container);
            }
        }
    }
@@ -377,18 +378,40 @@ public class NavigationBarView extends LinearLayout {
    private void updateKeyButtonViewResources(ViewGroup container) {
        ViewGroup midNavButtons = (ViewGroup) container.findViewById(R.id.mid_nav_buttons);
        if (midNavButtons != null) {
            final int nChildern = midNavButtons.getChildCount();
            for (int i = 0; i < nChildern; i++) {
            final int nChildren = midNavButtons.getChildCount();
            for (int i = 0; i < nChildren; i++) {
                final View child = midNavButtons.getChildAt(i);
                if (child instanceof KeyButtonView) {
                    ((KeyButtonView) child).updateResources();
                }
            }
        }
        KeyButtonView kbv = (KeyButtonView) findViewById(R.id.six);
        KeyButtonView kbv = (KeyButtonView) findViewById(R.id.one);
        if (kbv != null) {
            kbv.updateResources();
        }
        kbv = (KeyButtonView) findViewById(R.id.six);
        if (kbv != null) {
            kbv.updateResources();
        }
    }

    private void updateLightsOutResources(ViewGroup container) {
        ViewGroup lightsOut = (ViewGroup) container.findViewById(R.id.lights_out);
        if (lightsOut != null) {
            final int nChildren = lightsOut.getChildCount();
            for (int i = 0; i < nChildren; i++) {
                final View child = lightsOut.getChildAt(i);
                if (child instanceof ImageView) {
                    final ImageView iv = (ImageView) child;
                    // clear out the existing drawable, this is required since the
                    // ImageView keeps track of the resource ID and if it is the same
                    // it will not update the drawable.
                    iv.setImageDrawable(null);
                    iv.setImageResource(R.drawable.ic_sysbar_lights_out_dot_large);
                }
            }
        }
    }

    @Override
Loading