Skip to content

Commit

Permalink
fixed crash with parentheses key
Browse files Browse the repository at this point in the history
  • Loading branch information
Xlythe committed Sep 18, 2012
1 parent 995b242 commit 7e46020
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions AndroidManifest.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android2.calculator3"
android:versionCode="17"
android:versionName="1.7.1"
android:versionCode="18"
android:versionName="1.7.2"
android:installLocation="auto">

<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="16"/>
Expand Down
2 changes: 1 addition & 1 deletion src/com/android2/calculator3/EventListener.java
Expand Up @@ -175,7 +175,7 @@ public void run() {
case R.id.parentheses:
if(mHandler.getText().equals(mErrorString)) mHandler.setText("");
if(mHandler.getText().contains("=")) {
mHandler.setText(mHandler.getText().split("=", 1)[0] + "=(" + mHandler.getText().split("=", 1)[1] + ")");
mHandler.setText(mHandler.getText().split("=")[0] + "=(" + mHandler.getText().split("=")[1] + ")");
}
else{
mHandler.setText("(" + mHandler.getText() + ")");
Expand Down

0 comments on commit 7e46020

Please sign in to comment.