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

Commit 3296e4c3 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 12361654 from 4a3586f3 to 24Q4-release

Change-Id: Ib876f834fdd198a9cb184ba44be31edc463803f6
parents 5f44db86 4a3586f3
Loading
Loading
Loading
Loading
+19 −7
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import android.content.res.Resources;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException;
import android.database.sqlite.SQLiteReadOnlyDatabaseException;
import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.BitmapFactory;
@@ -187,6 +188,7 @@ public abstract class BaseIconCache {
    }

    private synchronized void updateIconParamsBg(final int iconDpi, final int iconPixelSize) {
        try {
            mIconDpi = iconDpi;
            mDefaultIcon = null;
            mUserFlagOpMap.clear();
@@ -194,6 +196,16 @@ public abstract class BaseIconCache {
            mIconDb.close();
            mIconDb = new IconDB(mContext, mDbFileName, iconPixelSize);
            mCache.clear();
        } catch (SQLiteReadOnlyDatabaseException e) {
            // This is known to happen during repeated backup and restores, if the Launcher is in
            // restricted mode. When the launcher is loading and the backup restore is being cleared
            // there can be a conflict where one DB is trying to delete the DB file, and the other
            // is attempting to write to it. The effect is that launcher crashes, then the backup /
            // restore process fails, then the user's home screen icons fail to restore. Adding this
            // try / catch will stop the crash, and LoaderTask will sanitize any residual icon data,
            // leading to a completed backup / restore and a better experience for our customers.
            Log.e(TAG, "failed to clear the launcher's icon db or cache.", e);
        }
    }

    @Nullable
+2 −2
Original line number Diff line number Diff line
@@ -35,8 +35,8 @@ android_test {
        "**/*.kt",
    ],
    libs: [
        "android.test.runner",
        "android.test.base",
        "android.test.runner.stubs.system",
        "android.test.base.stubs.system",
    ],
    test_suites: ["device-tests"],
}
+6 −1
Original line number Diff line number Diff line
@@ -15,4 +15,9 @@
     limitations under the License.
-->

<manifest package="com.android.app.viewcapture"/>
 No newline at end of file
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.android.app.viewcapture">
    <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"
        tools:ignore="ProtectedPermissions" />
</manifest>
+0 −5
Original line number Diff line number Diff line
@@ -15,12 +15,7 @@
  -->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.android.app.viewcapture.test">

    <uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"
        tools:ignore="ProtectedPermissions" />

    <application
        android:debuggable="true"
        android:theme="@android:style/Theme.NoTitleBar">