Skip to content

Commit

Permalink
This fixes #94, fixes #92 and prevents a crash in case of Internal Se…
Browse files Browse the repository at this point in the history
…rver Error
  • Loading branch information
droidchef committed Nov 21, 2014
1 parent c977c05 commit 01b4056
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 13 deletions.
30 changes: 21 additions & 9 deletions mifosng-android/mifosng-android.iml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,13 @@
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/dependency-cache" />
Expand Down Expand Up @@ -87,23 +86,36 @@
</content>
<orderEntry type="jdk" jdkName="Android API 20 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="jsr250-api-1.0" level="project" />
<orderEntry type="library" exported="" name="android-iconify-1.0.6" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="dagger-1.2.1" level="project" />
<orderEntry type="library" exported="" name="play-services-5.0.89" level="project" />
<orderEntry type="library" exported="" name="support-v4-20.0.0" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="javax.annotation-api-1.2" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="espresso-support-v4-1.1-r3" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="hamcrest-library-1.1" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="espresso-1.1-r3" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-20.0.0" level="project" />
<orderEntry type="library" exported="" name="support-annotations-20.0.0" level="project" />
<orderEntry type="library" exported="" name="guava-r09" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="jsr305-1.3.9" level="project" />
<orderEntry type="library" exported="" name="jsr250-api-1.0" level="project" />
<orderEntry type="library" exported="" name="crashlytics-1.1.13" level="project" />
<orderEntry type="library" exported="" name="gson-2.2.4" level="project" />
<orderEntry type="library" exported="" name="sugar_cipher" level="project" />
<orderEntry type="library" exported="" name="gson-2.2.4" level="project" />
<orderEntry type="library" exported="" name="native-libs" level="project" />
<orderEntry type="library" exported="" name="butterknife-4.0.1" level="project" />
<orderEntry type="library" exported="" name="retrofit-1.4.1" level="project" />
<orderEntry type="library" exported="" name="play-services-5.0.89" level="project" />
<orderEntry type="library" exported="" name="support-v4-20.0.0" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="support-v4-19.0.1" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="hamcrest-core-1.1" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="espresso-runner-1.1-r3" level="project" />
<orderEntry type="library" exported="" name="sqlcipher" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="espresso-runner-runtime-1.1-r3" level="project" />
<orderEntry type="library" exported="" name="picasso-pollexor-2.1.1" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-20.0.0" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="javax.inject-1" level="project" />
<orderEntry type="library" exported="" name="commons-codec" level="project" />
<orderEntry type="library" exported="" name="support-annotations-20.0.0" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="guava-16.0" level="project" />
<orderEntry type="library" exported="" name="fliptables-1.0.1" level="project" />
<orderEntry type="library" exported="" name="guava-r09" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="hamcrest-integration-1.1" level="project" />
</component>
</module>

Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@

import butterknife.ButterKnife;
import butterknife.InjectView;
import butterknife.OnClick;
import retrofit.Callback;
import retrofit.RetrofitError;
import retrofit.client.Response;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,14 @@ public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {

@Override
public void failure(RetrofitError retrofitError) {
try{

Log.i(getActivity().getLocalClassName(), retrofitError.getLocalizedMessage());

Toast.makeText(activity, "Savings Account not found.", Toast.LENGTH_SHORT).show();
Log.i(getActivity().getLocalClassName(), retrofitError.getLocalizedMessage());
}catch(NullPointerException npe) {
Toast.makeText(activity, "Internal Server Error", Toast.LENGTH_SHORT).show();
}
safeUIBlockingUtility.safelyUnBlockUI();
getFragmentManager().popBackStackImmediate();
}
}
);
Expand Down

0 comments on commit 01b4056

Please sign in to comment.