Merge "Don't synchronize inside getWallpaperColors()" into oc-dr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
2de66f7be1
@@ -22,9 +22,9 @@ import android.annotation.Nullable;
|
|||||||
import android.annotation.RawRes;
|
import android.annotation.RawRes;
|
||||||
import android.annotation.RequiresPermission;
|
import android.annotation.RequiresPermission;
|
||||||
import android.annotation.SdkConstant;
|
import android.annotation.SdkConstant;
|
||||||
|
import android.annotation.SdkConstant.SdkConstantType;
|
||||||
import android.annotation.SystemApi;
|
import android.annotation.SystemApi;
|
||||||
import android.annotation.SystemService;
|
import android.annotation.SystemService;
|
||||||
import android.annotation.SdkConstant.SdkConstantType;
|
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
import android.content.ContentResolver;
|
import android.content.ContentResolver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@@ -74,7 +74,6 @@ import java.io.InputStream;
|
|||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
@@ -369,10 +368,10 @@ public class WallpaperManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
WallpaperColors getWallpaperColors(int which) {
|
WallpaperColors getWallpaperColors(int which) {
|
||||||
synchronized (this) {
|
if (which != FLAG_LOCK && which != FLAG_SYSTEM) {
|
||||||
if (which != FLAG_LOCK && which != FLAG_SYSTEM)
|
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException(
|
||||||
"which should be either FLAG_LOCK or FLAG_SYSTEM");
|
"Must request colors for exactly one kind of wallpaper");
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return mService.getWallpaperColors(which);
|
return mService.getWallpaperColors(which);
|
||||||
@@ -381,7 +380,6 @@ public class WallpaperManager {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public Bitmap peekWallpaperBitmap(Context context, boolean returnDefault,
|
public Bitmap peekWallpaperBitmap(Context context, boolean returnDefault,
|
||||||
@SetWallpaperFlags int which) {
|
@SetWallpaperFlags int which) {
|
||||||
|
|||||||
Reference in New Issue
Block a user