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

Commit afa7d85b authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 9008

* changes:
  Only restore the bits for wallpapers that aren't built in.
parents 1c3f760d 9bb8fd77
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -578,7 +578,7 @@ class ApplicationContext extends Context {
    @Override
    public void setWallpaper(Bitmap bitmap) throws IOException  {
        try {
            ParcelFileDescriptor fd = getWallpaperService().setWallpaper();
            ParcelFileDescriptor fd = getWallpaperService().setWallpaper(null);
            if (fd == null) {
                return;
            }
@@ -598,7 +598,7 @@ class ApplicationContext extends Context {
    @Override
    public void setWallpaper(InputStream data) throws IOException {
        try {
            ParcelFileDescriptor fd = getWallpaperService().setWallpaper();
            ParcelFileDescriptor fd = getWallpaperService().setWallpaper(null);
            if (fd == null) {
                return;
            }
@@ -627,13 +627,16 @@ class ApplicationContext extends Context {
    @Override
    public void clearWallpaper() throws IOException {
        try {
            Resources resources = getResources();
            /* Set the wallpaper to the default values */
            ParcelFileDescriptor fd = getWallpaperService().setWallpaper();
            ParcelFileDescriptor fd = getWallpaperService().setWallpaper(
                    "res:" + resources.getResourceName(
                        com.android.internal.R.drawable.default_wallpaper));
            if (fd != null) {
                FileOutputStream fos = null;
                try {
                    fos = new ParcelFileDescriptor.AutoCloseOutputStream(fd);
                    setWallpaper(getResources().openRawResource(
                    setWallpaper(resources.openRawResource(
                            com.android.internal.R.drawable.default_wallpaper),
                            fos);
                } finally {
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ interface IWallpaperService {
    /**
     * Set the wallpaper.
     */
    ParcelFileDescriptor setWallpaper();
    ParcelFileDescriptor setWallpaper(String name);
    
    /**
     * Get the wallpaper.
+1 −6
Original line number Diff line number Diff line
@@ -97,12 +97,7 @@ public class BackupDataInput {

    public void skipEntityData() throws IOException {
        if (mHeaderReady) {
            int result = skipEntityData_native(mBackupReader);
            if (result >= 0) {
                return;
            } else {
                throw new IOException("result=0x" + Integer.toHexString(result));
            }
            skipEntityData_native(mBackupReader);
        } else {
            throw new IllegalStateException("mHeaderReady=false");
        }
+26 −13
Original line number Diff line number Diff line
@@ -25,18 +25,31 @@ import java.util.ArrayList;
import java.util.HashMap;

public abstract class FileObserver {
    public static final int ACCESS = 0x00000001; /* File was accessed */
    public static final int MODIFY = 0x00000002; /* File was modified */
    public static final int ATTRIB = 0x00000004; /* Metadata changed */
    public static final int CLOSE_WRITE = 0x00000008; /*  Writtable file was  closed */
    public static final int CLOSE_NOWRITE = 0x00000010; /* Unwrittable file closed */
    public static final int OPEN = 0x00000020; /* File was opened */
    public static final int MOVED_FROM = 0x00000040; /* File was moved from X */
    public static final int MOVED_TO = 0x00000080; /* File was moved to Y */
    public static final int CREATE = 0x00000100; /* Subfile was created */
    public static final int DELETE = 0x00000200; /* Subfile was deleted */
    public static final int DELETE_SELF = 0x00000400; /* Self was deleted */
    public static final int MOVE_SELF = 0x00000800; /* Self was moved */
    /** File was accessed */
    public static final int ACCESS = 0x00000001;
    /** File was modified */
    public static final int MODIFY = 0x00000002;
    /** Metadata changed */
    public static final int ATTRIB = 0x00000004;
    /** Writable file was closed */
    public static final int CLOSE_WRITE = 0x00000008;
    /** Unwrittable file closed */
    public static final int CLOSE_NOWRITE = 0x00000010;
    /** File was opened */
    public static final int OPEN = 0x00000020;
    /** File was moved from X */
    public static final int MOVED_FROM = 0x00000040;
    /** File was moved to Y */
    public static final int MOVED_TO = 0x00000080;
    /** Subfile was created */
    public static final int CREATE = 0x00000100;
    /** Subfile was deleted */
    public static final int DELETE = 0x00000200;
    /** Self was deleted */
    public static final int DELETE_SELF = 0x00000400;
    /** Self was moved */
    public static final int MOVE_SELF = 0x00000800;

    public static final int ALL_EVENTS = ACCESS | MODIFY | ATTRIB | CLOSE_WRITE 
            | CLOSE_NOWRITE | OPEN | MOVED_FROM | MOVED_TO | DELETE | CREATE
	    | DELETE_SELF | MOVE_SELF;
+1 −1
Original line number Diff line number Diff line
@@ -1087,7 +1087,7 @@
                 android:hasCode="false"
                 android:label="@string/android_system_label"
                 android:allowClearUserData="false"
                 android:backupAgent="com.android.internal.backup.SystemBackupAgent"
                 android:backupAgent="com.android.server.SystemBackupAgent"
                 android:icon="@drawable/ic_launcher_android">
        <activity android:name="com.android.internal.app.ChooserActivity"
                android:theme="@style/Theme.Dialog.Alert"
Loading