21
21
import android .content .Context ;
22
22
import android .content .pm .PackageManager ;
23
23
import android .graphics .Bitmap ;
24
- import android .os .Build ;
25
24
import android .os .Looper ;
26
25
import android .os .Process ;
27
26
import android .os .StatFs ;
36
35
import static android .content .Context .ACTIVITY_SERVICE ;
37
36
import static android .content .pm .ApplicationInfo .FLAG_LARGE_HEAP ;
38
37
import static android .os .Build .VERSION .SDK_INT ;
38
+ import static android .os .Build .VERSION_CODES .HONEYCOMB ;
39
39
import static android .os .Build .VERSION_CODES .HONEYCOMB_MR1 ;
40
40
import static android .os .Process .THREAD_PRIORITY_BACKGROUND ;
41
41
import static android .provider .Settings .System .AIRPLANE_MODE_ON ;
@@ -192,7 +192,7 @@ static int calculateMemoryCacheSize(Context context) {
192
192
ActivityManager am = (ActivityManager ) context .getSystemService (ACTIVITY_SERVICE );
193
193
boolean largeHeap = (context .getApplicationInfo ().flags & FLAG_LARGE_HEAP ) != 0 ;
194
194
int memoryClass = am .getMemoryClass ();
195
- if (largeHeap && Build . VERSION . SDK_INT >= Build . VERSION_CODES . HONEYCOMB ) {
195
+ if (largeHeap && SDK_INT >= HONEYCOMB ) {
196
196
memoryClass = ActivityManagerHoneycomb .getLargeMemoryClass (am );
197
197
}
198
198
// Target ~15% of the available heap.
@@ -229,7 +229,7 @@ static boolean isWebPFile(InputStream stream) throws IOException {
229
229
return isWebPFile ;
230
230
}
231
231
232
- @ TargetApi (Build . VERSION_CODES . HONEYCOMB )
232
+ @ TargetApi (HONEYCOMB )
233
233
private static class ActivityManagerHoneycomb {
234
234
static int getLargeMemoryClass (ActivityManager activityManager ) {
235
235
return activityManager .getLargeMemoryClass ();
@@ -254,7 +254,7 @@ public PicassoThread(Runnable r) {
254
254
}
255
255
}
256
256
257
- @ TargetApi (Build . VERSION_CODES . HONEYCOMB_MR1 )
257
+ @ TargetApi (HONEYCOMB_MR1 )
258
258
private static class BitmapHoneycombMR1 {
259
259
static int getByteCount (Bitmap bitmap ) {
260
260
return bitmap .getByteCount ();
0 commit comments