am 0f668f3c: Prevent GNL from crashing on JB
* commit '0f668f3c2be93ad9be221d868abb3d9a6e418f18': Prevent GNL from crashing on JB
This commit is contained in:
commit
b6711ac01c
|
@ -366,7 +366,11 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
|
|||
// This code triggers requestLayout so must be posted outside of the
|
||||
// layout pass.
|
||||
public void run() {
|
||||
if (isAttachedToWindow()) {
|
||||
boolean attached = true;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
attached = isAttachedToWindow();
|
||||
}
|
||||
if (attached) {
|
||||
setDataIsReady();
|
||||
onDataReady(getMeasuredWidth(), getMeasuredHeight());
|
||||
}
|
||||
|
|
|
@ -59,6 +59,7 @@ import android.graphics.Rect;
|
|||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.os.Handler;
|
||||
|
@ -3378,7 +3379,13 @@ public class Launcher extends Activity
|
|||
if (Utilities.isLmp()) {
|
||||
for (int i = 0; i < layerViews.size(); i++) {
|
||||
View v = layerViews.get(i);
|
||||
if (v != null && v.isAttachedToWindow()) v.buildLayer();
|
||||
if (v != null) {
|
||||
boolean attached = true;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
attached = v.isAttachedToWindow();
|
||||
}
|
||||
if (attached) v.buildLayer();
|
||||
}
|
||||
}
|
||||
}
|
||||
mStateAnimation.start();
|
||||
|
@ -3625,7 +3632,13 @@ public class Launcher extends Activity
|
|||
if (Utilities.isLmp()) {
|
||||
for (int i = 0; i < layerViews.size(); i++) {
|
||||
View v = layerViews.get(i);
|
||||
if (v != null && v.isAttachedToWindow()) v.buildLayer();
|
||||
if (v != null) {
|
||||
boolean attached = true;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||
attached = v.isAttachedToWindow();
|
||||
}
|
||||
if (attached) v.buildLayer();
|
||||
}
|
||||
}
|
||||
}
|
||||
mStateAnimation.start();
|
||||
|
|
Loading…
Reference in New Issue