From a4f0e9da9698ef3e4edb8237b787e462ae7c2c12 Mon Sep 17 00:00:00 2001 From: daneren2005 Date: Thu, 26 Jun 2014 08:40:34 -0700 Subject: Non-stupid fix for GB crash --- src/github/daneren2005/dsub/util/UserUtil.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/github/daneren2005/dsub/util/UserUtil.java b/src/github/daneren2005/dsub/util/UserUtil.java index c6e307e8..baa56935 100644 --- a/src/github/daneren2005/dsub/util/UserUtil.java +++ b/src/github/daneren2005/dsub/util/UserUtil.java @@ -21,6 +21,7 @@ import android.content.Context; import android.content.DialogInterface; import android.content.SharedPreferences; import android.os.Build; +import android.support.v7.app.ActionBarActivity; import android.util.Log; import android.view.View; import android.widget.Adapter; @@ -79,8 +80,8 @@ public final class UserUtil { @Override protected void done(Void result) { - if(context instanceof Activity && Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { - ((Activity) context).invalidateOptionsMenu(); + if(context instanceof ActionBarActivity) { + ((ActionBarActivity) context).supportInvalidateOptionsMenu(); } } -- cgit v1.2.3