Fix for wrong package name after obfuscation

This commit is contained in:
serso 2015-01-27 23:24:13 +01:00
parent b51a78567f
commit 467a753f21

View File

@ -29,10 +29,10 @@ import android.content.res.Resources;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import org.simpleframework.xml.Serializer; import org.simpleframework.xml.Serializer;
import org.simpleframework.xml.core.Persister; import org.simpleframework.xml.core.Persister;
import org.solovyev.android.calculator.CalculatorApplication;
import org.solovyev.android.calculator.MathEntityDao; import org.solovyev.android.calculator.MathEntityDao;
import org.solovyev.android.calculator.MathEntityPersistenceContainer; import org.solovyev.android.calculator.MathEntityPersistenceContainer;
import org.solovyev.android.calculator.MathPersistenceEntity; import org.solovyev.android.calculator.MathPersistenceEntity;
import org.solovyev.android.calculator.R;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@ -111,7 +111,7 @@ public class AndroidMathEntityDao<T extends MathPersistenceEntity> implements Ma
public String getDescription(@Nonnull String descriptionId) { public String getDescription(@Nonnull String descriptionId) {
final Resources resources = context.getResources(); final Resources resources = context.getResources();
final int stringId = resources.getIdentifier(descriptionId, "string", R.class.getPackage().getName()); final int stringId = resources.getIdentifier(descriptionId, "string", CalculatorApplication.class.getPackage().getName());
try { try {
return resources.getString(stringId); return resources.getString(stringId);
} catch (Resources.NotFoundException e) { } catch (Resources.NotFoundException e) {