diff options
author | Jorge Ruesga <jorge@ruesga.com> | 2013-08-12 00:54:34 +0200 |
---|---|---|
committer | Jorge Ruesga <jorge@ruesga.com> | 2013-08-12 00:54:34 +0200 |
commit | 493a43fe8cbdd5b6c30733cc8c7024bc89acd780 (patch) | |
tree | 34747fd027c6d6432956ca5d940109f0b4c56633 /src/org/cyanogenmod | |
parent | 8b11ba2e0c6d9b90d63dde362f7af59c147ce002 (diff) | |
download | android_packages_wallpapers_PhotoPhase-493a43fe8cbdd5b6c30733cc8c7024bc89acd780.tar.gz android_packages_wallpapers_PhotoPhase-493a43fe8cbdd5b6c30733cc8c7024bc89acd780.tar.bz2 android_packages_wallpapers_PhotoPhase-493a43fe8cbdd5b6c30733cc8c7024bc89acd780.zip |
Make it compatible with API 15 (4.0.3)
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Diffstat (limited to 'src/org/cyanogenmod')
-rw-r--r-- | src/org/cyanogenmod/wallpapers/photophase/preferences/DispositionFragment.java | 8 | ||||
-rw-r--r-- | src/org/cyanogenmod/wallpapers/photophase/shapes/OopsShape.java | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/org/cyanogenmod/wallpapers/photophase/preferences/DispositionFragment.java b/src/org/cyanogenmod/wallpapers/photophase/preferences/DispositionFragment.java index 504601a..f078573 100644 --- a/src/org/cyanogenmod/wallpapers/photophase/preferences/DispositionFragment.java +++ b/src/org/cyanogenmod/wallpapers/photophase/preferences/DispositionFragment.java @@ -44,8 +44,12 @@ public abstract class DispositionFragment private Runnable mRedraw = new Runnable() { @Override public void run() { - if (getActivity() == null || getActivity().isDestroyed()) return; - mDispositionView.setDispositions(getUserDispositions(), getCols(), getRows()); + if (getActivity() == null) return; + try { + mDispositionView.setDispositions(getUserDispositions(), getCols(), getRows()); + } catch (Exception ex) { + // Ignored + } } }; diff --git a/src/org/cyanogenmod/wallpapers/photophase/shapes/OopsShape.java b/src/org/cyanogenmod/wallpapers/photophase/shapes/OopsShape.java index 13b3b17..7b50921 100644 --- a/src/org/cyanogenmod/wallpapers/photophase/shapes/OopsShape.java +++ b/src/org/cyanogenmod/wallpapers/photophase/shapes/OopsShape.java @@ -87,7 +87,7 @@ public class OopsShape implements DrawableShape { */ public OopsShape(Context ctx, int resourceMessageId) { super(); - + int orientation = ctx.getResources().getConfiguration().orientation; float[] vertex = VERTEX_COORDS_PORTRAIT; if (orientation == Configuration.ORIENTATION_LANDSCAPE) { |