Markup under feature flag

We check for this sometimes before the app is initialized. Maybe we just
shouldn't?

On Mon, Dec 15, 2014 at 2:03 PM, ctsims <notifications@github.com> wrote:
>
> In app/src/org/commcare/dalvik/preferences/DeveloperPreferences.java
> <https://github.com/dimagi/commcare-odk/pull/90#discussion-diff-21847669>:
>
> > @@ -69,4 +69,13 @@ public static boolean isSuperuserEnabled(){
> >          SharedPreferences properties = CommCareApplication._().getCurrentApp().getAppPreferences();
> >          return properties.getString(SUPERUSER_ENABLED, BuildConfig.DEBUG ? CommCarePreferences.YES : CommCarePreferences.NO).equals(CommCarePreferences.YES);
> >      }
> > +
> > +    public static boolean isMarkupEnabled(){
> > +        try{
> > +            SharedPreferences properties = CommCareApplication._().getCurrentApp().getAppPreferences();
> > +            return properties.getString(MARKUP_ENABLED, BuildConfig.DEBUG ? CommCarePreferences.YES : CommCarePreferences.NO).equals(CommCarePreferences.YES);
> > +        } catch(NullPointerException e){
>
> Why are you NPE checking here? what would cause an unexpected pointer to
> be null?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/dimagi/commcare-odk/pull/90/files#r21847669>.
>